Metatrader 5 coding questions / issues - page 3

Mladen Rakic
222580
Mladen Rakic  
dr.house7:
instead for mt5 there is this function right? ObjectGetDouble

No

ObjectGetDouble() is a simple ObjectGet() in metatrader 4. You have to use ObjectGetValueByTime() function to get what ObjectGetValueByShit() is used for in metatrader 4 (except that you don't use the number of the bar but the time of the bar that you wish to test)

drhouse7
706
drhouse7  

Mladen,

according to you, is it very difficult to create an include file with an indicator calculation? Is there a good explanation on how do it?

Mladen Rakic
222580
Mladen Rakic  
dr.house7:
Mladen, according to you, is it very difficult to create an include file with an indicator calculation? Is there a good explanation on how do it?

Doc

There is no short explanation for that.

drhouse7
706
drhouse7  
mladen:
Doc There is no short explanation for that.

indeed I cannot find a real guide, but there are many example

like this one very interesting:

Implementation of Indicators as Classes by Examples of Zigzag and ATR - MQL5 Articles

what's your idea on zigzag professional indy?

Mladen Rakic
222580
Mladen Rakic  
dr.house7:
indeed I cannot find a real guide, but there are many example

like this one very interesting:

Implementation of Indicators as Classes by Examples of Zigzag and ATR - MQL5 Articles

what's your idea on zigzag professional indy?

Doc

Making classes is doing object orientated coding. Much better to make functions that are independent (have their own variables all at one place and they do not depend from the rest of the code - we did that a couple of times in the "whats interesting" thread). Making clases will just slow down your code execution (test some stuff make as classes and you will see what do I mean - it will not work faster even with real binary executable code and with a pcode that metatrader uses it is a simple waste of time)

drhouse7
706
drhouse7  
mladen:
Doc Making classes is doing object orientated coding. Much better to make functions that are independent (have their own variables all at one place and they do not depend from the rest of the code - we did that a couple of times in the "whats interesting" thread). Making clases will just slow down your code execution (test some stuff make as classes and you will see what do I mean - it will not work faster even with real binary executable code and with a pcode that metatrader uses it is a simple waste of time)

could you please show me this with an indicator here or in the advanced forum? Something like macd of zz

Mladen Rakic
222580
Mladen Rakic  
dr.house7:
could you please show me this with an indicator here or in the advanced forum? Something like macd of zz

Doc

Sorry, but what would be a macd of zz (since zigzag has only "control points" and macd is entirely based on averages)?

drhouse7
706
drhouse7  
mladen:
Doc Sorry, but what would be a macd of zz (since zigzag has only "control points" and macd is entirely based on averages)?

I choose the wrong name...essentially I'm talking about the histo of crossing ma with trendlines

drhouse7
706
drhouse7  

I never see something like that, just because probably is not possible

Mladen Rakic
222580
Mladen Rakic  
dr.house7:
I never see something like that, just because probably is not possible

Doc

It is not impossible. It is simply too specific and, due to usage of trendlines (which are objects) it is sort of "too specific". You already have a solution in metatrader 4 - conversion of that to metatrader 5 using ObjectGetValueByTime() function is not that difficult