Attention Ravique and Sccz97: JMA

Hi guys

First, thanks all for making various versions of JMA available.

I attempted to port this indicator to WealthLab (WLScript). I converted each line very carefully to WLScript. I made sure that with the exception of syntax, nothing else was changed. Unfortunately the JMA drops to zero from the latest bar to latest bar - 30. Other values seem to be correct. I suspect there is an inversion error somewhere. However from reading Ravique’s and Sccz97’s .Net code, I did not get the impression that the array was somehow reversed.

Much like the versions of your code, in the WL version, the loops are backward. I’m not exactly sure why my WL version behaves this way. I went over the code with the proverbial fine tooth comb and sans syntax, it is exact the same as your versions of the JMA - at least as far as I can see… Did you guys experience such a behavior in your intial stages of development?

I apologize if this post is bit off-topic and not completely related to MT.

Thanks very much in advance.

I’ve never had this issue with JMA before, but it seems buggy to me somehow.

Anyway, compare the output values from WL JMA with the MT JMA. If they differ then it means that you have bugs in your WL code. I think ML and MQL language is just incompatible. The arrays don’t work the same way.

You may be right in regards to incompatibility of arrays between MQL and WLScript. In WLScript, the first bar in the array is the earliest bar in the series and its number is naturally zero. Obviously the last bar in the array is the latest time stamped bar. I assumed that MQL arrays are created the same way. Perhaps I was wrong.

Thanks for your response.

There is a big discussian on JMA going on in the moneytec forum, I did not read the whole thing, but somewhere i remember they are righting about soom loop problems, or values changing in historr, or whatever like this.Think if you are interested you should run through this post on moneytec


I am a 0 in all what is related to coding, so I can`t really help you out myself. Scorp is the code guru here =D