What's wrong with this parabolic data1 and data2 ?  [SOLVED]

Questions about MultiCharts and user contributed studies.
Automeq
Posts: 96
Joined: 16 Apr 2014
Has thanked: 12 times
Been thanked: 1 time

What's wrong with this parabolic data1 and data2 ?

I have a chart where I plotted same instrument with different time frames

data1 = 5 minutes
data2 = 30 minutes

Then I created following indicator. Ideia is to plot parabolic of 30 minutes (data2) in the 5 minutes chart (data1) - I know that could be done directly but this is something I'm testing to use in a signal.

Code: Select all

`inputs:   AfStep1( 0.001 ), AfLimit1( 0.2 ),   // parameters for data1 (5 minutes)         AfStep2( 0.005 ), AfLimit2( 0.2 );   // parameters for data2 (30 minutes)variables:      var0(0),var1(0),var2(0),var3(0),   // parameters for data1 (5 minutes)         var4(0),var5(0),var6(0),var7(0);   // parameters for data2 (30 minutes)Value1 = ParabolicSAR( AfStep1, AfLimit1, var0, var1, var2, var3 ) of data1;Value2 = ParabolicSAR( AfStep2, AfLimit2, var4, var5, var6, var7 ) of data2;plot1(var4)`

If I plot this indicator in data1 (5 minutes) shouldn't I get the parabolic(0.005,0.2) of 30 minutes plotted in 5 minutes chat ?

I'm getting values that I don't understand where they are coming from.

TJ
Posts: 6971
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 984 times
Been thanked: 1995 times

Re: What's wrong with this parabolic data1 and data2 ?  [SOLVED]

Automeq wrote:I have a chart where I plotted same instrument with different time frames

data1 = 5 minutes
data2 = 30 minutes

Then I created following indicator. Ideia is to plot parabolic of 30 minutes (data2) in the 5 minutes chart (data1) - I know that could be done directly but this is something I'm testing to use in a signal.

Code: Select all

`inputs:   AfStep1( 0.001 ), AfLimit1( 0.2 ),   // parameters for data1 (5 minutes)         AfStep2( 0.005 ), AfLimit2( 0.2 );   // parameters for data2 (30 minutes)variables:      var0(0),var1(0),var2(0),var3(0),   // parameters for data1 (5 minutes)         var4(0),var5(0),var6(0),var7(0);   // parameters for data2 (30 minutes)Value1 = ParabolicSAR( AfStep1, AfLimit1, var0, var1, var2, var3 ) of data1;Value2 = ParabolicSAR( AfStep2, AfLimit2, var4, var5, var6, var7 ) of data2;plot1(var4)`

If I plot this indicator in data1 (5 minutes) shouldn't I get the parabolic(0.005,0.2) of 30 minutes plotted in 5 minutes chat ?

I'm getting values that I don't understand where they are coming from.

See post #5
viewtopic.php?f=16&t=6929
These users thanked the author TJ for the post:
Automeq

Automeq
Posts: 96
Joined: 16 Apr 2014
Has thanked: 12 times
Been thanked: 1 time

Re: What's wrong with this parabolic data1 and data2 ?

Thank you very much TJ !

I leave here the simplified code for the case someone, someday, drops in this post.

Code: Select all

`inputs:   AfStep2( 0.005 ), AfLimit2( 0.2 );               // parameters for parabolic of data2variables:   var4(0,data2),var5(0,data2),var6(0,data2),var7(0,data2);   // parameters for parabolic of data2Value2 = ParabolicSAR( AfStep2, AfLimit2, var4, var5, var6, var7 )data2;plot1(var4)`

And btw that post you mentioned is a true gem ! Really appreciated.