Hello freinds,
I need your help:
I had a MQL4 indicator - called - AbsoluetStrength, and a good freind of mind cleaned it and "translated" it to MQL5.
Unfortunatally, we do not know why the MQL5 version does not work.Can somebody try to fix it?Thanks && Enjoy.
----------------------------
Hi Crossy,
I played with it a little bit and I did get some interesting results. To start with...it compiles fine.
I tried it and found out the following:
1) As it is now, the range is Infinite...so the math formulas need checking...values are way off the scale.
2) I set Min/Max +/-10 range and saw some lines but they were long lines...not crossing for days.
3) I changed Draw_Line to Draw Histograms...just to see if anything was actually working...and it does look like it's trying...lol!
See the attached screen shot to see the infinite values and the Histo-bars.
Hope this helps track down the problems,
Robert
Thanks Roberts for your efforts.
It looks likes the problem is the Value of the AbsoluteStrength (=AS) indi.
The Origion at H4 chart is about 100-200, and here we are at -9E12 (= -9,000,000,000,000) This is the problem. Can you have any
conclusions from that?
Y.
Thanks Roberts for your efforts.
It looks likes the problem is the Value of the AbsoluteStrength (=AS) indi.
The Origion at H4 chart is about 100-200, and here we are at -9E12 (= -9,000,000,000,000) This is the problem. Can you have any
conclusions from that?
Y.
More discoveries --
Line 80 - Case 0 - RSI - I could not get RSI to work. I looked at other MT5 code samples using Case.
1) Looks like "break" needs to be added in this Line 80.
2) No break after the last method (default). Seems to work now when I use RSI Case 0...and the others.
Displayed Values On Screen:
I displayed the values on the screen with Comments -It does get real time values. Interesting and very helpful...lots of clues to work with.
Some values actually look close to what the MT4 values look like. See attached screen shots
Others I don't know...
1.#INF - I assume this means Infinity...?
1.#QNAN - No clue what this means.
Regarding any conclusions for the huge numbers? The formulas still need tweaking, however I'm still a
novice MT5 coder and I would need to find MT5 examples to compare the formulas with (that's how I learn).
In the meantime, I'll let you folks play with that math part. Maybe you can divide by a billion...?? lol!
Better yet....Now that the values are displayed...maybe other advanced coders can easily see the problem and help with this now...
Hope this helps,
Robert
Hi Crossy,
Found an MT5 article that may help you - explains the #INF Infinity and #QNAN (not a number)... Beyond me at this point.
https://www.mql5.com/en/docs/basis/types/double
I did try one more thing - I added NormalizedDouble to the display values and they look better, but still get the #INF and the #QNAN...
Closer and closer...
Robert
- www.mql5.com
Hi.
I don't understand difficult things. but it works anyway.
MT4
MT5
![mt5 mt5](https://c.mql5.com/3/3/astmt5.png)
Hi.
I don't understand difficult things. but it works anyway.
MT4
MT5
Thnak you Kurl. It works well.
Thanks Robert for your efforts.
I think that it will be a good idea to have a written manual with a maproad way to write an indicatore, which it looks more difficault to write, then an EA.
Y.
Thanks Crossy...you are welcome and it was fun to...experiment and share...lol!
Thanks to Kurl also for the final solution. I wasn't even close...
And after looking at the code Kurl added...and he says "I don't understand difficult things. but it works anyway."...? Gosh, I feel less intelligent than a dumb rock...lol!
So being a humble person...I've just demoted myself from a basic MT5 novice coder...to "Less Smarter Than A Dumb Rock MT5 Novice Coder"...
Lots to learn with MT5.
Thanks to you both for the learning adventure...!
Robert
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello freinds,
I need your help:
I had a MQL4 indicator - called - AbsolutStrengh, and a good freind of mind cleaned it and "translated" it to MQL5.
Here are the 2 versions.
Unfortunatally, we do not know why the MQL5 version does not work.
Can somebody try to fix it?
Thanks && Enjoy.