Please advise - How to rewrite an indicator from Rulang to MQL4(four) ? - page 6

 
Dmitry Fedoseev:
How about this?

Here:


//VOL-F#2//.

Variable : Lev1($data),Lev2($data);

n=inparam("n",1,5,1);

Lev1=ref(Lev1,-1);

Lev2=ref(Lev2,-1);

if h>l then k=(h-l)/v;

if h>l and v>ref(v,-1) and v>ref(v,-2) and v>ref(v,+1) and v>ref(v,+2) and k>ref(k,-1) and k>ref(k,-2)and k>ref(k,+1) and k>ref(k,+2) then fv=v;

if h>l then f=fv;

x=HHV(f,1);

if f=x and c>o then lev1=h;

if f=x and c<o then Lev2=l;

Lev1;

Lev2;

Notex=HHV(f,1);

For other values of n it's necessary to rewrite all formula text in Rumus, in my opinion. I have just another tool with extended formula for that, it's easier.

 
Compare the quotes, especially the volumes. And in MT there is no cheating, two bars later the new level starts to be drawn.
 
Urman Ru:

And the picture looks good!)As designed. Levels should be attached and then you can tell for sure.

My attack has subsided. I'm cured. Here's the code, do what you like with it.

Files:
 
Urman Ru:

Here:


//VOL-F#2//.

Variable : Lev1($data),Lev2($data);

n=inparam("n",1,5,1);

Lev1=ref(Lev1,-1);

Lev2=ref(Lev2,-1);

if h>l then k=(h-l)/v;

if h>l and v>ref(v,-1) and v>ref(v,-2) and v>ref(v,+1) and v>ref(v,+2) and k>ref(k,-1) and k>ref(k,-2)and k>ref(k,+1) and k>ref(k,+2) then fv=v;

if h>l then f=fv;

x=HHV(f,1);

if f=x and c>o then lev1=h;

if f=x and c<o then Lev2=l;

Lev1;

Lev2;

Notex=HHV(f,1);

For other values of n it's necessary to rewrite all formula text in Rumus, in my opinion. I have just another tool with extended formula for that, it's easier.

Where does it come from? There are supposed to be errors in the code.

 
Dmitry Fedoseev:
More like this:

I can't get the clocks to load.

 
Dmitry Fedoseev:

Where is this coming from? There are supposed to be errors in the code.

This is my own Rumus turkey on Rulang. I don't know about errors, it works like clockwork in Rumus.

Here on 15.

 
Alexey Viktorov:

My attack subsided. I've recovered. Here's the code, do what you like with it.

It didn't take long for the music to play.

Thank you very much.)

 
Dmitry Fedoseev:
Compare the quotes, especially the volumes. Well and in MT no cheating, two bars later a new level starts to be drawn.

I don't think there is much difference.

But it's still amazing how the same thing can be approached in different ways.

But so far we haven't.(

 
Urman Ru:

I don't think there is much difference.

But it's still amazing how the same thing can be approached in different ways.

But so far we haven't.(

Oh, dear. You don't have to think here, you have to look here.

I have errors, it just worked with this algorithm. In Rumus it works only with n=1 - there you go.

 
Put the contents of f on a graph in your rumus - see what's in it.