RecordingTime#
tradeexecutor.state.visualisation.RecordingTime Python class in Trading Strategy framework.
- class RecordingTime[source]#
Bases:
Enum
At what timestamp this data is being recorded.
Are we avoiding look ahead bias or not.
All decisions are made on a candle open. During the decision, we can access previous candle close that is more or less equivalent of the current candle open. But we cannot access the current candle high, low, or close values because those have not happened yet.
When the data is recorded by decide_trades it is recording the previous cycle data used in the decision making. For daily candles, a decision today is based on the data of yesterday. Thus this data does not represent technical indicator calculations over time series, but decision making inputs. This is to avoid look ahead bias.
This causes one decision making cycle lag charts when comparing charts with market analysis charts, because those charts operate on the current candle open, high, low, close values.
Because decision making visualisation is uncommon and causes confusion, we will later correct this in
tradeexecutor.visual.techical_indicator
, so that plots are shifted to match their market occurence timestamps.- __init__()#
Attributes
The plot value was recorded for decision making.
The plot value represents technical indicator at the time of the market.
- decision_making_time = 'decision_making_time'#
The plot value was recorded for decision making.
Shift data to match market timestamps.
- market_time = 'market_time'#
The plot value represents technical indicator at the time of the market.
Accessing the latest item in this plot cannot be used for decision making, but charts are natively sync with other market analysis charts.