Summary of Problem/background:
I am trying to place a buy stop order when the price hits a certain price, but I only want this to happen once, however I keep producing pending orders.
For example if on "EURUSD" , the price reaches 1.06700 and then places a buy stop at 1.06725. How do I ensure this only happens once through the coding, as the problem I am experiencing is that
it keeps producing orders every time it touches 1.06700.
I am new at coding so any help would be much appreciated.
Sorry to ask, but I'm not too sure what magic numbers are and how to use them, (they have always confused me). What do you mean by flag for next order?
with no. 3 (allow another order after defined timespan), do you mean using the Sleep () function after typing the Ordersend () Function.