Find out which condition was apart each trade
I was wondering there was an easy way to find out all the conditions surrounding a trade. For example; if I set a strategy to only take a position when a fast exceeds a slow MA; is there any way for me to attach that easily to the transaction log, a graph or perhaps a table?
It would make it phenomenally easier to analyze which things are apart of the "Winners" and the "losers" trades.
You can of course always access the value generated by an indicator (like a
Crossoverof fast/slow moving averages) and do whatever you want with it.
This shows up automatically in the charts and can be automatically logged with a Docs - Writers
I would set a list of dictionaries. On each trade opening in
notify_tradeI would get
trade.refand write all required data as an item (dictionary) to the list. Then at the trade closing I would add
trade.refas index or reference. At the very end save everything to
.csv, open in excel and do whatever diagrams I want. Or transform to
pandasDataFrame and play using
Can be actually written as an analyzer. Indicators you want to check can be added as parameters and it will be quite flexible to use with different strategies.
Just thoughts. :)