What about using a demo account to execute what you describe in the Strategy tester with hist. dates and in visual mode?
It is made exactly for this and your questions.
I was looking at this order type page https://www.mql5.com/en/docs/integration/python_metatrader5/mt5ordercalcmargin_py#order_type
and i'm wondering, if there's no close order constant, instead if its just the ORDER_TYPE_SELL constant that closes the underlying positions in the pair.
so i'm assuming, if i have 10 lots, buy position(s) open in GBPUSD, and i send in a sell order for 10 lots in GBPUSD, it is not going to place a new sell order for 10 lots, its just going to close previous buy position(s).
hence leaving me with net 0 lots open position in GBPUSD.
so if i send in a 15 lot sell order instead of 10 lots, it is going to close previous 10 lot buy positions(s) and will place 5 lot sell order in GBPUSD, (10 - 15 = -5)
I'm assuming this is correct, since i've built an algorithm around the stock market, they had the similar convention of things.
I just don't want to build an algorithm, around assuming things only to find out i missed or incorrectly assumed something critical, 3-4 months down the line
You need to handle two cases yourself, depending on the type of your account:
Netting System or Hedging System .

- www.metatrader5.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I was looking at this order type page https://www.mql5.com/en/docs/integration/python_metatrader5/mt5ordercalcmargin_py#order_type
and i'm wondering, if there's no close order constant, instead if its just the ORDER_TYPE_SELL constant that closes the underlying positions in the pair.
so i'm assuming, if i have 10 lots, buy position(s) open in GBPUSD, and i send in a sell order for 10 lots in GBPUSD, it is not going to place a new sell order for 10 lots, its just going to close previous buy position(s).
hence leaving me with net 0 lots open position in GBPUSD.
so if i send in a 15 lot sell order instead of 10 lots, it is going to close previous 10 lot buy positions(s) and will place 5 lot sell order in GBPUSD, (10 - 15 = -5)
I'm assuming this is correct, since i've built an algorithm around the stock market, they had the similar convention of things.
I just don't want to build an algorithm, around assuming things only to find out i missed or incorrectly assumed something critical, 3-4 months down the line