Hi..,
i have written a code for getting a buy/short signal on the candle crossing and closing of BB top(default values) and simultaneously RSI (14) crossing and closing above 60..the code is below..,but i actually want to buy or sell at market price, the moment the current market price touches at the high/low of the signal candle....i tried using some methods but not able to
get the desired result...can some one help...
_SECTION_BEGIN("Buy Sell Arrow Signals");
Buy =Cross(C, BBandTop( C,20, 2 )) AND Cross( RSI(14), 60 );
Sell =Cross(BBandBot( C,20, 2 ), C) AND Cross( 40, RSI(14) ) ;
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-30);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0, L, Offset=-40);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-35);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=30);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=40);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-35);
_SECTION_END();