![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
Thanks for this great article...
In the function ReplacedDelayedOrders is the code line: for(int b=0;i<history_orders;b++)
I think this will cause an endless loop, or am I wrong?
I think the code line must be: for(int b=0;b<history_orders;b++)
Bye, T.
Thank you, this is a great article and a good framework. Exactly what I was looking for.
I plan to use it with real money, is it the latest version?
Thanks
Great article!
I had to change two things to get it working.
On the file "TableOrders.mqh" on this function bool CTableOrders::Add(ulong Ticket,double stop_loss,double take_profit) line 89, the variable m_type should be replaced by:
From:
m_type=order_info.Type();
To:
m_type=order_info.OrderType();
The second one also on the "TableOrders.mqh":
From:
class CTableOrders : CObject
To:
class CTableOrders : public CObject
Regards,
A. HUPP
in order to compile the file simple_model.mq5 i had to add "public":
class CModel: public CObject at line 12
while compiling MACD_MA_model.mq5 i keep getting this error:
'MODE_OPEN' - enumerator identifier already defined stdlib.mqh 13 4
i cannot get around this error which refers to underlying library.
Thank you for your article and the effort to build a general framework for testing.
in order to compile the file simple_model.mq5 i had to add "public":
class CModel: public CObject at line 12
while compiling MACD_MA_model.mq5 i keep getting this error:
'MODE_OPEN' - enumerator identifier already defined stdlib.mqh 13 4
i cannot get around this error which refers to underlying library.
Thank you for your article and the effort to build a general framework for testing.
https://www.mql5.com/en/forum/244512
min_risk = point * tick_value * symbol_info_.LotsStep();
you should use tick count instead of point count.
tick_count = MathAbs(open_price - stop_loss) / symbol_info_.TickSize();
because in some symbols, tick size != point
for example:
Futures\Agricultural Commodities\#Coffee_H21:
You shouldn't delete node when iterating the list.
for example:
After deleting node at index 5, you iterate index 6, but the next element is still index 5.
It's a better idea using GetFirstNode / GetNextNode
Thanks for your contribution!
In the CTableOrders class, I think you should use order_info.OrderType() instead of order_info.Type()