Articles

A Generic Optimization Formulation (GOF) to Implement Custom Max with Constraints for MetaTrader 5

In this article we will present a way to implement optimization problems with multiple objectives and constraints when selecting "Custom Max" in the Setting tab of the MetaTrader 5 terminal. As an example, the optimization problem could be: Maximize Profit Factor, Net Profit, and Recovery Factor

Forum

percent margin below 1% when using CMoney classes

double CAccountInfo::MaxLotCheck( const string symbol, const ENUM_ORDER_TYPE trade_operation, const double price, const double percent) const { double margin= 0.0 ; //--- checks if (symbol== "" || price<= 0.0 || percent< 1 || percent> 100 ) in this piece of code

debug button is disabled

Since yesterday I can't debug my main EA because the debug button is disabled (grayed out). I am able to debug indicators, but not the EA. Any body knows the reason for that to happen

Undesired extra chart

Hi all, When running a single simulation in the Strategy Tester with the "visual mode with the display of charts, indicators and trades" checked ON (Settings tab), I get a new separate window with the full simulation. That is what I want. However, I also get another (undesired) chart in the terminal

Optimizing time frame - Tester question

1) One of my input variables is SimTimeFrame (input ENUM_TIMEFRAMES SimTimeFrame ); 2) In the tab "Settings" I set the time frame to "M1", and set Modeling to "Every tick based on real ticks" 3) I run the optimization with "Custom max." 4) In the tab " Optimization Results " I select one of the