Number of bars that are executed before Zorro can begin to trade (default = 80). Required for most indicators or other functions that need a certain amount of previous price history for their calculations. Set LookBack to a value that is sure to cover the longest period of all used indicators and time frames, or set it to 0 when no lookback period is required. The maximum lookback period for live trading is one year; for even longer periods the PRELOAD flag must be used. Backtests can have any lookback period as long as it does not exceed the total number of bars.


Strips off the given period (default = 40) from cumulative indicators. Some indicators, even when calculated over a finite period, are influenced by an infinite number of past bars. They are cumulative - indicators "with memory". Examples are the EMA (Exponential Moving Average) and the ATR (Average True Range). They use their previous bar's value in their algorithm, which in turn use the value of their previous bars, and so forth. This way a given value will have influence on all the subsequent values. In contrast, a simple moving average (SMA) only reflects the average of its period, without any influence from bars further in the past.
Because a price series is always finite and starts at a certain point, the effect of missing past bars is the more significant, the closer to the start a cumulative indicator is calculated. Thus a trade strategy using the EMA or derived indicators (such as the MACD) could behave different dependent on its bar number. The UnstablePeriod value allows to strip off such initial unstable period and remove the influence of all bars prior to this period. This way indicators are guaranteed to behave the same way regardless of the amount of past data. For coming as close to the real cumulative formula as possible, strip off as much data as you can afford. Getting rid of 40 bars (default) is reasonable for most indicators.


Maximum number of trades per bar, or 0 (default) for automatically estimating the maximum. Determines the allowed total number of trades when multiplied with the assets and bars of the simulation. Also affects the maximum allowed number of series. Opening more trades causes an Error 049 message. Set this to a higher value when the strategy needs to enter an unusual number of trades or create an unusual number of series, as for special systems such as grid trading, or for training an advise function. Set it to a low value, such as 1, for saving memory when the system does not trade more often than once per bar on average.


Minimum daily trading time of the least traded asset in minutes (default = 360, i.e. 60 minutes * 6 hours). Internally used for determining the maximum lookback time. Set this to a lower value when Error 047 indicates that the lookback period gets not enough historical bars at trading start. This can be the case when an asset is only traded a few hours per day, or when you use a bar function that produces only a few bars per day.





UnstablePeriod = 60;
LookBack = 120+UnstablePeriod; // required for ATR(120) 
Stop = ATR(120);

See also:

bar, BarPeriod, TimeFrame, BarOffset, Trading Start, Date


► latest version online