I am fairly new to NinjaScript so I apologize if my question might sound naive
I am building a strategy and during the execution part I have an issue with the stop loss
inside protected override void OnBarUpdate()
I am creating some calculations and once met I am using this block for execution:
EnterLongLimit(1, entryPrice, "BullishEntry");
SetStopLoss("BullishEntry", CalculationMode.Price, stopPrice, false);
SetProfitTarget("BullishEntry", CalculationMode.Price, targetPrice);
the issue that I encountered is that with this method sometimes when price reaches the stop loss and it tries to place the order, price already went below and I get an error "Orders cannot be placed above the market". One thing I noticed is that when manually placing an ATM strategy the stop loss is a solid red color (stop loss), however when using this strategy the stop loss is a pale pink color (Stop Market Order)....
How can I change the StopLoss so that it places a stop loss at a defined price right away upon entry rather than placing a stop market order that gets triggered once price reaches my defined price?
Comment