Xaverage - data2 - not good value

Questions about MultiCharts and user contributed studies.
rondot samuel ws
Posts: 103
Joined: 05 Sep 2007
Has thanked: 8 times
Been thanked: 6 times

Xaverage - data2 - not good value

Postby rondot samuel ws » 24 Sep 2008

Hello,

Chart #1 data 1"
Chart #2 same data 5"

strategy :
just 1 line
print(Date,Time, XAverage( Close of data2, 12) );

question :
if data1 = 5" = data2 then print is different than if data1 = 1"

Why the Xaverage of Data2 is diferent following UT oF Data1. I always refer only to data2, which is 5" ?

Many thanks for any reply

regards

Samuel

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 25 Sep 2008

Hi Samuel,

What resolutions do you use?

Regards.

rondot samuel ws
Posts: 103
Joined: 05 Sep 2007
Has thanked: 8 times
Been thanked: 6 times

Postby rondot samuel ws » 25 Sep 2008

Hi Samuel,

What resolutions do you use?

Regards.
hi,

Look my code : I use :
print(Date,Time, XAverage( Close of data2, 12) );

So the difference is the value which is print, not that i look with my eye.

regards

Laurent

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 25 Sep 2008

Dear Laurent,

I asked you about the resolution because if you use tick-based resolutions the values will never coincide. When plotting non-time based resolutions within the same chart window it is impossible to sinchronize them. The bars will never be plotted under each other: where you already have bar 2 on data #1, you will still have bar 1 on data#2 etc. The attached screenshot will illustrate what I am talking about.
Attachments
TicksSeries.PNG
(19.51 KiB) Downloaded 593 times

rondot samuel ws
Posts: 103
Joined: 05 Sep 2007
Has thanked: 8 times
Been thanked: 6 times

Postby rondot samuel ws » 25 Sep 2008

Dear Laurent,

I asked you about the resolution because if you use tick-based resolutions the values will never coincide. When plotting non-time based resolutions within the same chart window it is impossible to sinchronize them. The bars will never be plotted under each other: where you already have bar 2 on data #1, you will still have bar 1 on data#2 etc. The attached screenshot will illustrate what I am talking about.
ok im thinking you speak about screen resolution.

as i mention in the beginnig of my post, first chart i use 1 minute and second one 5 minutes.

The bars are ok and the "close of data2" have good value.

If you could use the same configuration on your computer, it took only 1 minute for do it, i could know if you have the same troubble

regards

Laurent

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 30 Sep 2008

Dear Laurent,

I am pasting the sample code below. Using this code should solve your problem:

XAverage(Close of Data2, 12) of Data2

Let me know how it works for you.

rondot samuel ws
Posts: 103
Joined: 05 Sep 2007
Has thanked: 8 times
Been thanked: 6 times

Postby rondot samuel ws » 30 Sep 2008

Dear Laurent,

I am pasting the sample code below. Using this code should solve your problem:

XAverage(Close of Data2, 12) of Data2

Let me know how it works for you.
yes !!!!

many thanks !!!


Return to “MultiCharts”