Coding help - page 72

 

Mladen is it possible to convert this Metastock formula to MT4. I'll attached my failed attempt If you can take a quick look I'll appreciate it.

Period:=16;

Velo1:= Mov(C,period,S);

Velo2:= C - Velo1;

Velo5:= Ref(Velo2,-period);

Velo6:= Velo2 - Velo5;

MMVelo:= Mov(Velo6,period/2,S);

MMVelo;

explanation:

period is the number of bar

C is the close

MOV is the moving average and S is simple

ref is the number of bar previous

Files:
 

altoronto

This should be it (except that I used period 32 for default cycle period)

altoronto:
Mladen is it possible to convert this Metastock formula to MT4. I'll attached my failed attempt If you can take a quick look I'll appreciate it.

Period:=16;

Velo1:= Mov(C,period,S);

Velo2:= C - Velo1;

Velo5:= Ref(Velo2,-period);

Velo6:= Velo2 - Velo5;

MMVelo:= Mov(Velo6,period/2,S);

MMVelo;

explanation:

period is the number of bar

C is the close

MOV is the moving average and S is simple

ref is the number of bar previous
Files:
 

Thank you Mladen, my code was way off I need to eat more "pogacha" to get there

 

Problems with Cycle Koufr

Hi

i'm using the cycle_koufer extremus (e) with 30pips Rangebars (you also need the Cycle_KROUFR_version in the indicator folder). It works fine for EURUSD and EURJPY with a setting of 12,24,50. But when i'm changing the slow MA to 34 (12,34,50) it only works with EURJPY.

The whole afternoon i'm looking for the problem...could someone please have a look at this?

Thank you

_cycle_koufer_extremus_e.mq4

cycle_kroufr_version.mq4

 

pokrat

What are you exactly trying to achieve?

pokrat:
Hi

i'm using the cycle_koufer extremus (e) with 30pips Rangebars (you also need the Cycle_KROUFR_version in the indicator folder). It works fine for EURUSD and EURJPY with a setting of 12,24,50. But when i'm changing the slow MA to 34 (12,34,50) it only works with EURJPY.

The whole afternoon i'm looking for the problem...could someone please have a look at this?

Thank you

_cycle_koufer_extremus_e.mq4

cycle_kroufr_version.mq4
 

Forget about the question. Here is a version that works on any symbol and for any parameters settings

 
mladen:
Forget about the question. Here is a version that works on any symbol and for any parameters settings

thank you mladen...but i'm having the same problems with your version....everything works fine until a slow MA of 28 - and then i'm getting this picture:

Files:
cycle.png  17 kb
 

I am not getting that error (it works OK on my terminal) so can not help you more, except that that kind of display almost exclusively happens when a runtime error (like zero divide) happens somewhere in the code

pokrat:
thank you mladen...but i'm having the same problems with your version....everything works fine until a slow MA of 28 - and then i'm getting this picture:
 

thank you mladen...

 

pokrat

Been checking the Cycle_KROUFR_version indicator since and found things like this (at line 117) :

max_min=max-min;

That line (and some similar) can cause repainting (due to how min and max are stored - they can keep min and max value from a previous tick and that is wrong) on a new tick. That indicator needs a serrious revision and is probably the cause of all your problems.

Reason: