I am currently using market orders, but i would prefer to use limit. Is there a way to update the order at the next bar if it is not filled. This is my attempt:
[COLOR=black][FONT="]CalculateOnBarClose = [/FONT][/COLOR][COLOR=blue][FONT="]true[/FONT][/COLOR][COLOR=black][FONT="];[/FONT][/COLOR] [COLOR=black][FONT="] {[/FONT][/COLOR] [COLOR=blue][FONT="]string[/FONT][/COLOR][COLOR=black][FONT="][] entryOrder = GetAtmStrategyEntryOrderStatus(GetAtmStrategyUniqueId());[/FONT][/COLOR] [COLOR=blue][FONT="]if[/FONT][/COLOR][COLOR=black][FONT="] (entryOrder[[/FONT][/COLOR][COLOR=purple][FONT="]2[/FONT][/COLOR][COLOR=black][FONT="]] != [/FONT][/COLOR][COLOR=maroon][FONT="]"filled"[/FONT][/COLOR][COLOR=black][FONT="]);[/FONT][/COLOR] [COLOR=black][FONT="] AtmStrategyChangeEntryOrder(GetCurrentAsk(), [/FONT][/COLOR][COLOR=purple][FONT="]0[/FONT][/COLOR][COLOR=black][FONT="],GetAtmStrategyUniqueId());[/FONT][/COLOR] [COLOR=blue][FONT="]if[/FONT][/COLOR][COLOR=black][FONT="] (entryOrder[[/FONT][/COLOR][COLOR=purple][FONT="]2[/FONT][/COLOR][COLOR=black][FONT="]] == [/FONT][/COLOR][COLOR=maroon][FONT="]"filled"[/FONT][/COLOR][COLOR=black][FONT="]);[/FONT][/COLOR] [COLOR=black][FONT="] CalculateOnBarClose = [/FONT][/COLOR][COLOR=blue][FONT="]false[/FONT][/COLOR][COLOR=black][FONT="];[/FONT][/COLOR]
Comment