Thank you all, for your recomendations.
Now all the entry parameters are satisfied, I have a problem with the exit
************************************************** ******************************************
protected override void Initialize()
{
AddLineBreak("6E ##-##",PeriodType.Tick,LBticks, LBretorno, MarketDataType.Last);
Add("6E ##-##",PeriodType.Volume,Volumen,MarketDataType.Last) ;
protected override void OnBarUpdate()
{
if(BarsInProgress != 0)
return;
if (Position.MarketPosition == MarketPosition.Flat)
{
..............
&& Close[0] < BollingerBorde(2, PerBoll).Middle[0] - VarBoll * TickSize
&& Closes[1][1] < BollingerBorde((BarsArray[1]),2, PerBoll).InfB[1]
&& WMA(BarsArray[2],PerWMA)[0] > WMA(BarsArray[2],PerWMA)[1])
{
EnterLong(DefaultQuantity, "1LBW");
}
,,,,,,,,,,,
else if (Position.MarketPosition == MarketPosition.Long)
{
if (WMA(BarsArray[2],PerWMA)[0] < WMA(BarsArray[2],PerWMA)[1])
{
ExitLong("1LBW", "1LBW");
}
}
************************************************** *******************************************
I can not find the error.
Comment