Hello,
i have a problem with pendings orders in backtest , this is my code
Now describe in detail WHAT YOU DO: WHERE do you run this code - in the strategy tester or in the terminal?
Now describe in detail WHAT YOU DO: WHERE do you run this code - in the strategy tester or in the terminal?
Hello,
i have a problem with pendings orders in backtest, this is my code
OrdersTotal() return always 0 even if there is some pending orders active as you can see below:
how i can solved this problem?
Thanks
Davide
No idea how you are doing that. OrdersTotal() works fine in the Strategy Tester, just checked.
I use strategy tester and i doesn't work.. Always return 0 as you can see in the image, tomorow
I seem to understand what the user is doing: he wants to access pending orders on a real account from the strategy tester (launching debugging on historical data).
I seem to understand what the user is doing: he wants to access pending orders on a real account from the strategy tester (launching debugging on historical data).
i create expert advisor, i tested in stategy tester and in strategy tester orderstotal() return me always 0
i create expert advisor, i tested in stategy tester and in strategy tester orderstotal() return me always 0
Where is your full MQL5 code? Without code, it's not clear what you are doing.
From the tester in the "debug on history" mode, there is NO access to a real account.
i try to explain better:
as you can see into strategy tester visualition (from 01/01/2019 to 2019.12.12) pics my expert has opened on 02/01/2019 at 11:00:06:
1 pending order ticket 3
1 position ticket 2
i lunched strategy tester straight from metaeditor with blue botton
when i called OrdersTotal() (iOrders) return 0 even if ticket 3 is pending order (buy limit)
-------------------------------------------------------------------------------------------------------
after i do another test on real account i made a stupid script:
this is the result :
OrdersTotal() works without problem
i hope to have been clear.
I use mt5 of icmarkets latest build
Thanks Davide
Forum on trading, automated trading systems and testing trading strategies
MT5 OrdersTotals() for active pending orders does't works in backtest strategy
Vladimir Karputov, 2019.12.23 11:26
Where is your full MQL5 code? Without code, it's not clear what you are doing.
From the tester in the "debug on history" mode, there is NO access to a real account.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
i have a problem with pendings orders in backtest, this is my code
OrdersTotal() return always 0 even if there is some pending orders active as you can see below:
how i can solved this problem?
Thanks
Davide