Forums ProRealTime English forum ProOrder support opening a pos on a specific price Reply To: opening a pos on a specific price

#209104
JS

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…

1 user thanked author for this post.