Coding help - page 74

 
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

Hi Mladen,

Another thing:

on all time frames I use a SMA 15 ...so...one of my tool is the distance % of low-high from this SMA.

here it is my metastock formula:

DISTANCEHL15:=If(Mov(C,15,S)>H,-1*((Mov(C,15,S)-L)*100)/L,If(Mov(C,15,S)<L,((H-Mov(C,15,S))*100)/Mov(C,15,S),0));

TRENDLINE:=0;

DISTANCEHL15;

TRENDLINE;

explanation:if sma is above H,plot the distance from SMA and low

if sma is below L,plot the distance from H and SMA.

when the rubber band is too pulled....price comes back to the SMA...

I need also input for color and for levels...

thank's in advance for coding it into mt4!

 

carbonmimetic

Try this one out.

PS: I still can not upload pictures, s till the developers do not solve that issue, no picture of how it looks like ...

carbonmimetic:
Hi Mladen,

Another thing:

on all time frames I use a SMA 15 ...so...one of my tool is the distance % of low-high from this SMA.

here it is my metastock formula:

DISTANCEHL15:=If(Mov(C,15,S)>H,-1*((Mov(C,15,S)-L)*100)/L,If(Mov(C,15,S)<L,((H-Mov(C,15,S))*100)/Mov(C,15,S),0));

TRENDLINE:=0;

DISTANCEHL15;

TRENDLINE;

explanation:if sma is above H,plot the distance from SMA and low

if sma is below L,plot the distance from H and SMA.

when the rubber band is too pulled....price comes back to the SMA...

I need also input for color and for levels...

thank's in advance for coding it into mt4!
Files:
carbon.mq4  2 kb
 

it is ok..thank you very much!

May be I will ask your help in the future...so ..how can I help you now?

Which market do you trade?

I trade dax and eurusd....if you want send me a PM.

Carbon

 

A smoothed version

carbonmimetic

Try out this one too. It is a smoothed version of the same indicator. If you wish to have the same value set the Smooth parameter to 1. Zero crosses are at exactly the same places only the values are smoother if you wish it (with Smooth set to > 1). Maybe helps a bit in "reading" the indicator (since the crosses are exactly the same I think that the essence of the indicator is kept as much as it can be).

Upper is the non-smoothed version and lower is the smoothed version on the example picture

 

Well,

thank's for your effort....but:

1) I use the RUBBER BAND on higher time frames

2) when cylce ends (for example 2days or 4 days cycles)

3)at this time there is always a sort of "little panic" and price goes away from SMA 15

4) alert :

A) indicator reaches very distance % from SMA

B) indicator forms divergences

5) TIMING FOR GO LONG on lower time frame:

A) reversal pattern( 123 low Ross)

B) Demark's setup OR sequential

C) stochastic divergence

This is ONE of my techniques and I apply it ONLY in that situation......so I do not need smoothed version because I cant see divergences or peaks and valleys!

If you want ask me more....I am in debt with you!

 

Hi Mladen,

I wrote also in HARMONIC TRADING....I am looking for an indi like CYCLE LINES in metastock...you can input for number of bar

please see image....thank you in advance.

Files:
cycle_lines.gif  27 kb
 
carbonmimetic:
Hi Mladen,

I wrote also in HARMONIC TRADING....I am looking for an indi like CYCLE LINES in metastock...you can input for number of bar

please see image....thank you in advance.

carbonmimetic

The image itself is not enough (I can only make wild guesses how it works based on the picture alone). What is it's formula?

 

Mladen,

CYCLE LINES is a tool of metastock...there is no formula....also in mt4 there is a tool named CYCLE LINES but I can not put number of bars....

So...I would like an indicator that :

1) from 2 lows(or 2 high) projected in the future the same number of bars OR ratios of that distance

OR

2) from a low or an high,projects in the future a number of bars I input in.

 

Help Coding this indicator

flower_afl.txt

Mladen/Mrtools is it possible to code a similar indicator in mt4.

I have no clue what this is based on . I have attached the image and the amibroker afl code.

Thanks in advance

Files:
flower.png  82 kb
 
carbonmimetic:
Mladen,

CYCLE LINES is a tool of metastock...there is no formula....also in mt4 there is a tool named CYCLE LINES but I can not put number of bars....

So...I would like an indicator that :

1) from 2 lows(or 2 high) projected in the future the same number of bars OR ratios of that distance

OR

2) from a low or an high,projects in the future a number of bars I input in.

Try this one

What it does is the following : it draws 2 thicker lines at the start. You have to adjust the position of those 2 lines. After that it draws required number of lines back and forth. Every time you adjust the thicker lines positions it redistributes the rest of the lines to reflect the two "main" lines positions

PS: it does not "clean up" after you remove the indicator (it is done so in order to keep the manually adjusted lines on screen even when you change time frames or symbols or you restart the terminal) so you have to clean up those lines manually when you remove it from the chart (best to place it on empty chart)

Files:
cycles.gif  45 kb