-
When you post code please use the CODE button (Alt-S)!
(For large amounts of code, attach it.) Please edit your post.
General rules and best pratices of the Forum. - General - MQL5 programming forum
Messages Editor - Do not assume history is ordered by date, it's not.
Could EA Really Live By Order_History Alone? (ubzen) - MQL4 and MetaTrader 4 - MQL4 programming forum
Count how many lost orders from the last profit order - MQL4 and MetaTrader 4 - MQL4 programming forum - You are also assuming everything in history is an closed order.
-
When you post code please use the CODE button (Alt-S)!
(For large amounts of code, attach it.) Please edit your post.
General rules and best pratices of the Forum. - General - MQL5 programming forum
Messages Editor - Do not assume history is ordered by date, it's not.
Could EA Really Live By Order_History Alone? (ubzen) - MQL4 and MetaTrader 4 - MQL4 programming forum
Count how many lost orders from the last profit order - MQL4 and MetaTrader 4 - MQL4 programming forum - You are also assuming everything in history is an closed order.
Thanks for your help.
1. I did edit my post. Hope it's better now.
2. Good to know and thanks for the tip. In my case I looked and on the case that I manually tested, OrdersHistory seemed aligned with dates.
3. Yes, thats what I want.
Still looking into it so far nothing conclusive
Hi,
Hello,
I'm trying to introduce an equity control within code of ea to improve it.
For example imagine I have an ea called EA1 ; this one will trade in min Lots with its own MagicNumber
EA2 will trade with regular Lots, different MagicNumber, same conditions as EA1 plus one: only allow trade if Past Trades Equity of EA1 is above the moving average of its last n Equity points.
I tried with following code in my ea but for some reason I get different results in Backtests than when I do the manual Equity Control.
If anyone sees the mistake that would be nice.
Regards,
Hi,
You're right thanks! Just amended it. No the problem though as it was already corrected in my ea
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
Hello,
I'm trying to introduce an equity control within code of ea to improve it.
For example imagine I have an ea called EA1 ; this one will trade in min Lots with its own MagicNumber
EA2 will trade with regular Lots, different MagicNumber, same conditions as EA1 plus one: only allow trade if Past Trades Equity of EA1 is above the moving average of its last n Equity points.
I tried with following code in my ea but for some reason I get different results in Backtests than when I do the manual Equity Control.
If anyone sees the mistake that would be nice.
Regards,