i have this code
if (Low[0] <= StopLoss && Position.MarketPosition == MarketPosition.Long && Position.AveragePrice > StopLoss)
{
Print(" STOP LOSS HIT: " + StopLoss + " " + Close[0] + " symbol " + Instrument.FullName);
// Trailing stop has been hit; do whatever you want here
ExitLong(Convert.ToInt32(NumberOfContract),"Stop Loss" ,"Long");
what is happening let us say the stop loss is at 2988 and price is trading at 3000 and started going down on the 5 min candle, it will hit the 2988 and keeps going down, the trade will close when that 5 min close instead of the 2988 how can I change the code so that when price hit 2988 it closes. in other words what is the code to set a stop buy limit order at 2988
any help is appreciated
Comment