Based on my trade signal I would like to place a Limit buy order above the High[0]. When I use the below syntax I am running into below error.
Can you please let me know what mistake was making. Thank you in advance.
On 31st Oct at 4.42pm EST the closed Bar High was 4203.75.
The next bar was open and high was 4203.75 and closed Red.
Here my goal is take Long position only if the price >= 4204.75
Code Snippet :
double limit =High[0] + 4 * TickSize;
double stop = High[0]+ 3 * TickSize;
Print(" Limit and Stop Values : "+limit +" : "+stop);
EnterShortStopLimit(limit,stop, "entry");
Log statements below :
Limit and Stop Values : 4204.75 : 4204.5
10/31/2023 4:43:00 PM Strategy 'SivaTradeBot/-1': Entered internal SubmitOrderManaged() method at 10/31/2023 4:43:00 PM: BarsInProgress=0 Action=SellShort OrderType=StopLimit Quantity=1 LimitPrice=4204.75 StopPrice=4204.50 SignalName='entry' FromEntrySignal=''
10/31/2023 4:43:00 PM Strategy 'SivaTradeBot/-1': Ignored SubmitOrderManaged() method at 10/31/2023 4:43:00 PM: BarsInProgress=0 Action=SellShort OrderType=StopLimit Quantity=1 LimitPrice=4204.75 StopPrice=4204.50 SignalName='entry' FromEntrySignal='' Reason='Invalid order price, please see log tab'

Comment