Buy Sell Condition

I have defined Buy Sell Conditions. Now i want to define one more condition for Sell if there is a Close below the Buy Candle. I am putting a sample code below. Now, whenever there is a close below the buy candle, i want the sell to occur. It like reversing the failed buy trade.

_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
_N( Title = Title +"\n" + _DEFAULT_NAME() );

Plot( C, “Close”, ParamColor(“Color”, colorDefault ), styleNoTitle | ParamStyle(“Style”) | GetPriceStyle() );

Buy = Close > Open
AND MACD( 12, 26 ) > MACD( 6, 13 );

Sell = Close < Open
AND MACD( 12, 26 ) < MACD( 6, 13 );



specify the code or condition in brief

1 Like

Hi Manjunath…
If U post u code it 'll be easy to answer…
Elaborate Ur another Sell condition?