Optimization of Trendlines

 

On MQL4 it was not possible to use Optimization with Trendlines (after creating then with ObjectCreate and then reading out their values).

It was possible to use the tester, but not with Optimization.


Is that possible now in MQL5?

 
claudio_arrau2:

On MQL4 it was not possible to use Optimization with Trendlines (after creating then with ObjectCreate and then reading out their values).

It was possible to use the tester, but not with Optimization.


Is that possible now in MQL5?

It is possible with mql4 and mql5,  as has already been stated on the mql4 forum . . .  just don't rely on the physical line,  know the start and end and interpolate . . . it's just simple mathematics.  

By the way,  Objects are less well supported in the MT5 Strategy Tester than the MT4 Strategy Tester.

trendline optimization - MQL4 forum
  • www.mql5.com
trendline optimization - MQL4 forum
 
RaptorUK:

It is possible with mql4 and mql5,  as has already been stated on the mql4 forum . . .  just don't rely on the physical line,  know the start and end and interpolate . . . it's just simple mathematics.  

By the way,  Objects are less well supported in the MT5 Strategy Tester than the MT4 Strategy Tester.


:) Well, simple mathematics is at the end everything we do in coding here...."simple" is a relative term ;)

Point is rather to really know, which commands/funtions etc. are really supported by the optimizer and which not. That is not documentated (or I didn't find it).

WHRoeder suggests iBarShift, so apparently this IS supported...Was not aware about this function at all :(

 
claudio_arrau2:


:) Well, simple mathematics is at the end everything we do in coding here...."simple" is a relative term ;)

Point is rather to really know, which commands/funtions etc. are really supported by the optimizer and which not. That is not documentated (or I didn't find it).

WHRoeder suggests iBarShift, so apparently this IS supported...Was not aware about this function at all :(

https://www.mql5.com/en/docs/runtime/testing
Documentation on MQL5: MQL5 programs / Testing Trading Strategies
Documentation on MQL5: MQL5 programs / Testing Trading Strategies
  • www.mql5.com
MQL5 programs / Testing Trading Strategies - Documentation on MQL5
 
claudio_arrau2:


:) Well, simple mathematics is at the end everything we do in coding here...."simple" is a relative term ;)

Point is rather to really know, which commands/funtions etc. are really supported by the optimizer and which not. That is not documentated (or I didn't find it).

WHRoeder suggests iBarShift, so apparently this IS supported...Was not aware about this function at all :(

I consider simple mathematics to be anything I did in school 20+ years ago,  linear equations and interpolation is included in that,  anyone that can't do this kind of Mathematics is going to struggle with other areas of their coding IMO.

Most functions will be supported under the Strategy Tester and Optimization, but there is a visual mode and Optimization is non-visual so Objects are not drawn when in non-visual modes.

Click the link that Alain provided above,  there is lots of info there . . . 

Documentation on MQL5: Standard Constants, Enumerations and Structures / Indicator Constants / Drawing Styles
Documentation on MQL5: Standard Constants, Enumerations and Structures / Indicator Constants / Drawing Styles
  • www.mql5.com
Standard Constants, Enumerations and Structures / Indicator Constants / Drawing Styles - Documentation on MQL5
Reason: