Coding help - page 45

 

Here you go

Andrewsurfer:
Great:) Thank You for Your help. Is there possible to change one more thing? Indicator now is still drawing lines after "Days to plot" period Could You change it so that after days to plot period there won't be any lines?
Files:
 
mladen:
Here you go

Thank You, thank You, thank You

 

hi not sure where to ask this, but what are the short codes like gda_100, gi_112 etc ? and where can I find a list of what they all mean, ie what function, etc, they abbreviate?

really hope for some help as i'd like to edit some mq4 with these codes instead of the usual code!

 

...

:):)

Those come from a decompiler and it means that that code was decompiled. They do not mean anything, only the decompiler is generating a unique name that is lost in the process (variables do not keep their original names once when the code is compiled)

zigflip:
hi not sure where to ask this, but what are the short codes like gad_100 ? and where can I find a list of what they all mean, ie what function, etc, they abbreviate? really hope for some help as i'd like to edit some mq4 with these codes instead of the usual code!
 
mladen:
:):):) Those come from a decompiler and it means that that code was decompiled. They do not mean anything, only the decompiler is generating a unique name that is lost in the process (variables do not keep their original names once when the code is compiled)

Ahh! Thank you

 

Mladen, can you take a quick look and point me what I am doing wrong .. I tried to add arrows on Aqua line crossing.

Your expertise and advice is much appreciate

To see it on chart any timeframe, first place gadi_obv then mnKilllingZone 1.3.1 (my version with arrows is 1.3.2)

Thank you in advance.

 

altoronto

As far as I see there is no loop in neither start() nor CheckObvLevels(). The loop is moved to init and it is always risky to do any serious data processing from init (just one example : a lot of times not all data is available when init is called). Will check it more, but so far that seems like a problem.

altoronto:
Mladen, can you take a quick look and point me what I am doing wrong .. I tried to add arrows on Aqua line crossing.

Your expertise and advice is much appreciate

To see it on chart any timeframe, first place gadi_obv then mnKilllingZone 1.3.1 (my version with arrows is 1.3.2)

Thank you in advance.
 
mladen:
altoronto As far as I see there is no loop in neither start() nor CheckObvLevels(). The loop is moved to init and it is always risky to do any serious data processing from init (just one example : a lot of times not all data is available when init is called). Will check it more, but so far that seems like a problem.

I saw it too.. but I was trying to only add arrows. I didn't want to mess too much with code, since I am still baby crawling in mql programming. If you have time to make it faster/cleaner in your fashion and style, I'll appreciate it and you'll get one more beer on my account

 

Conditional Comipilation

I need to set the property values for indicator_maximums and minimums to different values depending on the Symbol() on the chart

#property indicator_maximum 5.0

#property indicator_minimum -5.0

I know you can logically test for values of these two properties but I have not been successful in setting them in the Init() function by using a variable, e.g.

#property indicator_maximum value

#property indicator_minimum -value

or

indicator_maximum = value;

indicator_minimum = -value;

Any suggestions, or do I just have to select one value and use the common tab of the indicator to change the values for the fixed maximums and minimums?

Thanks,

Tzuman

 

...

All you can do is to "simulate" minimum an maximum but it is not always possible (if you have a lot of drawing buffers) since you have to sacrifice 2 drawing buffers. Set the style of 2 drawing buffers to DRAW_NONE and fill them with the maximum and minimum values (any value but EMPTY or EMPTY_VALUE) you wish. Even though they are not going to be visible they are going to extend the window to those limits (limits are not going to be 100% exact as the values in question but they will not deviate too much).

Also, if some of the values of the other drawing buffers exceed the values in the "minimum" and "maximum" buffers, they will be ignored (extended to new minimum or maximum)

Otherwise #property indicator_maximum and #property indicator_minimum are simply compile time constants and you can not alter them (or at least I haven't found any way to do it so far).

Tzuman:
I need to set the property values for indicator_maximums and minimums to different values depending on the Symbol() on the chart

#property indicator_maximum 5.0

#property indicator_minimum -5.0

I know you can logically test for values of these two properties but I have not been successful in setting them in the Init() function by using a variable, e.g.

#property indicator_maximum value

#property indicator_minimum -value

or

indicator_maximum = value;

indicator_minimum = -value;

Any suggestions, or do I just have to select one value and use the common tab of the indicator to change the values for the fixed maximums and minimums?

Thanks,

Tzuman
Reason: