Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 678

 
Hello.I would like to make a situation where if the drawdown is 10%, for example, the EA will not open new orders, it will just bring the opened ones to TP and that's it, and only the averaging ones will open. This will help me not to fall into a big drawdown, if my trading is performed on several pairs. I understand the function, I wish I could implement it.
 
Вадим Мотеюнас:

I have some skills in mql4, I'm thinking to go deeper, but will it be a waste of time?

I am not sure about the exact timing of MT4 and MQL4, but judging by the amount of signals on MT4 you don't have to worry much about a couple of years.

Well, the time is yours, and you can decide for nothing. I agree with the opinion of Artyom Trishkin.

 

Any idea how to deal with the "overlap bias" between the two indicators?

To make it clear example

First screenshot, marked a couple of tops, MACD and StdDev applied to it

Second screenshot, shifted the chart to the left and now StdDev is much lower and aliasing has occurred

Files:
c2w2lr.JPG  287 kb
g63ayy2.JPG  288 kb
 
Roman Sharanov:

Any idea how to deal with the "overlap bias" between the two indicators?

To make it clear example

First screenshot, marked a couple of tops, MACD and StdDev applied to it

The second screenshot, shifted the chart to the left showing that StdDev has become much lower and aliased

Do they have the same scale?

Build StdDev using MACD data - then there is no bias.

 
Artyom Trishkin:

Do they have the same scale?

Build StdDev using MACD data - then there is no bias.

That's how I build, StdDev calculation price - Previous indicator data

 
Roman Sharanov:

This is how I build, StdDev calculation prices - Previous indicator data

On MT4 ? I checked there - yes, it "walks". On MT5 all is normal.

 
Roman Sharanov:

Second screenshot, shifted the graph to the left, and you can see now StdDev is much lower, and there was an overlap

I haven't tried to work withPrevious indicator data for a long time, probably autoscaling is lagging,

alternatively try adding the #property indicator_minimum and indicator_maximum settings


 

Is it possible to make an indicator window hidden?

If you delete it via ChartIndicatorDelete, then you have to insert it somehow (I don't know how) or re-adjust the parameters when adding it manually.And if you make two templates with and without an indicator, the graphical objects on the chart are not memorised.

 
Hello Artyom. How toremove the second fractal in theiFreeNumFractals indicator, if the first upper fractal is higher than the second upper fractal and the difference between them is less than 10 pips. How do I basically remove an already set fractal?
 
Ghabo:
Hello Artyom. How toremove the second fractal in theiFreeNumFractals indicator, if the first upper fractal is higher than the second upper fractal and the difference between them is less than 10 pips. How should I remove an already set fractal?

To remove an already set fractal, you have to give the bar containing the fractal an empty buffer value: EMPTY_VALUE

Reason: