This is my first post to the forum.
I am developing a strategy for candles LineBreak when CalculateOnBarClose = true; does well, I attached example:
protected override void Initialize ()
{
AddLineBreak ("6E 09-14" PeriodType.Tick, 150, 5, MarketDataType.Last);
....
CalculateOnBarClose = true;
}
....
if (CurrentBars [0] <= BarsRequired || CurrentBars [1] <= BarsRequired)
return;
if (BarsInProgress ==0 )
....
* if (== Position.MarketPosition MarketPosition.Flat)
{
if (.....
&& Close [1] <BollingerMedioAriel ((BarsArray [1]), 2, PerBollSal) .InfAriel [0])
{
EnterLong ("1LA");
}
But CalculateOnBarClose = false; does not work, does not enter
The BarsArray [1], do not work When CalculateOnBarClose = false;
protected override void Initialize ()
{
AddLineBreak ("6E 09-14" PeriodType.Tick, 150, 5, MarketDataType.Last);
....
CalculateOnBarClose = false;
}
....
if (CurrentBars [0] <= BarsRequired || CurrentBars [1] <= BarsRequired)
return;
if (BarsInProgress ==0 )
....
if (== Position.MarketPosition MarketPosition.Flat)
{
if (.....
&& Close [1] <BollingerMedioAriel ((BarsArray [1]), 2, PerBollSal) .InfAriel [1])
{
EnterLongLimit (Close [1], "1LA");
}
Sorry for my English.
* Thank you
Comment