backtesting.py
backtesting.py copied to clipboard
MT5 Position Netting changing SLO/TP to the last trade Python 3
Expected Behavior
Actual Behavior
I have Mt5 Netting Demo account and I am using MT5 api to test my strategy on demo account
when any trade open it get merged in the same group and because of that I face the following problems:
- Stoploss and Take profit get revised not on average but as per the last trade, infact all trade requests have their separate slo/tp value
- so many lots/volume added i.e. 200+ sometimes which is not required because it gives too much loss at once
I want to know following:
- How to put slo/tp separately on individual lot/trade/volume
- How to limit lot/volume size not to trade more if I have 10 lots in 1 position.