Hello,
I try to sell using sell = 0;
and use applystop to generate sell action. But it generate noise buy signal(white circle), when i use Buy=Exrem(Buy,sell);
it makes the Buy action only 1 time and is still open (because the sell does not occur). here the code
Plot(C, "", colorwhite, styleLine);
Ma2 = EMA(C,68);
Plot(MA2, "", colorYellow, styleLine);
//////////////////////////////////////////////////////////////////////////
Buy = Cross(C, MA2);
Sell = 0 ;
//Buy = ExRem(Sell, Buy);
ApplyStop(stopTypeLoss,stopModePercent,Optimize( "max. loss stop level", 2, 2, 30, 1 ),1,0 );
ApplyStop(stopTypeProfit,stopModePercent,Optimize( "max. loss stop level", 2, 2, 30, 1 ),1,0);
PlotShapes (IIf (buy, shapeDigit1, shapeNone), colorWhite, 0,C, 0 );
PlotShapes (IIf (Sell, shapeDigit2, shapeNone), colorGreen, 0,C, 0 );
Thank you for your attention.