Stop ATR
-
I tried this, but didn't worked. The problem can be that I don't directly use those indicator handles. But they are integer numbers starting from 10, so I tried to put 10, 11... nothing. And I don't know why, because while I was testing the EA, my MA lines can be visible from the start. Maybe this is only for custom indicators, I don't know.
-
What a pity ... it seems to be correct code. I believe that if you succeed, will be helping the whole community fxDreema thinking of hiding your indicators and secrets.
-
__So ... that way it worked! Thanks!
But look at it this way: https://www.mql5.com/en/docs/runtime/te ... torrelease
Hide the indicator?To prohibit the showing of the indicator on the chart after testing, call the IndicatorRelease() with the handle of the indicator in the handler OnDeinit(). The OnDeinit() function is always called after the completion and before the showing of the testing chart.
//+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- bool hidden=IndicatorRelease(handle_ind); if(hidden) Print("IndicatorRelease() successfully completed"); else Print("IndicatorRelease() returned false. Error code ",GetLastError()); }In order to prohibit the showing of the indicator on the chart, after the completion of a single test, use the function IndicatorRelease() in the handler OnDeinit().
IndicatorRelease() https://www.mql5.com/en/docs/series/indicatorrelease
OnDeinit() https://www.mql5.com/en/docs/runtime/event_fire#deinit[/quote:8xh62xxu]Well ... anyway this is the solution described in MQL5. If I knew more programming I could even help fxDreema community.
-
Hello fxDreema. All right?
I stubborn again with the ATR. I want to do otherwise, without showing the indicator.
I found 3 values of ATR, in this project. Now I need the most amount of 3 results is chosen.
https://fxdreema.com/shared/MsxrHGxwe -
There is no block to do that or any other calculations with multiple values. Here is something that is not very pretty, but it does the job - https://fxdreema.com/shared/XAQKWPure
First, I put al values into an array and then I used this function to get the maximum value from that array - https://www.mql5.com/en/docs/array/arraymaximum
The syntax is not very beautiful, but we don't have many freedom with arrays in MQL4/MQL5. I tried this: double array[3] = {Value1, Value2, Value3), but it didn't worked... -
Well ... works start. With that I know TR Now to calculate the ATR just need to add this formula:
Current ATR = [(Before ATR x 13) + Current TR] / 14
or
ATR Shif0 = [(ATR Shift1 x 13) + TR Shift0] / 14The value 14 is the period I want to know.
-
Hello fxDreema.
Eae ... how this health?
When I return, and look what I did. Almost the same amount of MetaTrader ATR indicator.
https://fxdreema.com/shared/AqyTc8lXcYellow - MT5 Indicator
Lime - fxDreema Formulas blockNow, is not just the value of the MT5, but already suitable for use.
The best and most practical way would hide the MT5 indicators in backtestes, but I could not, I made this way.
I also hope to have helped other fellow users fxDreema.
See you!
Get well!
-
Almost healed.
Now I don't understand what you want to do
Before, I was thinking that you want to get the maximum value from... let's say 3 different values. But now I don't see attempts to determine maximum value. The way you translate your language to english does not work very well 
-
Yes ... the translator does not say exactly what I need, unfortunately.
I need but the higher value of 3 results, which is the ATR calculation, but I found the solution that approached this through the blocks.
-
Why don't you learn english?
Things are going to be muuuuuuch easier for you when you learn english. You can see that now when you don't know it, our communication is weird. My native language is also not english and this also adds to the confusion 
So, there is no problem anymore?

-
__Why don't you learn english?
Things are going to be muuuuuuch easier for you when you learn english. You can see that now when you don't know it, our communication is weird. My native language is also not english and this also adds to the confusion :)[/quote:1hg4j0mp]True ... It's something interesting to think about. Already a while I think about doing, but at the moment I do not see a real need. It will be a hobby maybe, but it's a good idea.

__So, there is no problem anymore?
[/quote:1hg4j0mp]Currently only in the comments, which are with an additional decimal place. ".0"
This leverage also 400 instead of 1:400See the picture below

I need Leverage 1: 400
And delete the additional decimal places in the ".0" -
__Currently only in the comments, which are with an additional decimal place. ".0"
This leverage also 400 instead of 1:400
...
I need Leverage 1: 400
And delete the additional decimal places in the ".0"[/quote:3kin5a4h]Solved. I noticed in the code that should change the Numeric to Text the Comment block.
In line Leverage, sufficed only I add "1" +
Look: ```
case 5: if (Label5 != "") { textlbl = Label5; text = (string)("1:"+ic_account_AccountLeverage()); } break;Instead of:case 5: if (Label5 != "") { textlbl = Label5; text = (string)(ic_account_AccountLeverage()); } break;
Now appears 1:400 -
Try this: http://prntscr.com/bn9768
-
Ok. It has facilitated for me. Thank you!