Forums › ProRealTime English forum › ProOrder support › opening a pos on a specific price › Reply To: opening a pos on a specific price
02/04/2023 at 2:42 PM
#209104
If you do not want to open cumulative orders, you must place the following line at the beginning of your code:
DefParam CumulateOrders=False
An alternative is to use:
If High CrossesOver Average[14](Close) then
Buy 1 contract at Market
EndIf
If Low CrossesUnder Average[14](Close) then
SellShort 1 contract at Market
EndIf
With the latter option, you only buy / sell when the price crosses with the average…