Problem Multiframe

Questions about MultiCharts and user contributed studies.
turbofib
Posts: 213
Joined: 11 May 2013
Has thanked: 67 times
Been thanked: 1 time

Problem Multiframe

Postby turbofib » 21 Sep 2014

hi,
in this 2 code below...it give me result different..i don't understand

Code: Select all


//CODE 1
var:gg(0,data3);

gg=(low of data3 + high of data3)/2;

value9=Average(gg ,13)[8] of data3;
value10=Average(gg ,8)[5] of data3;
value11=Average(gg,5)[3] of data3;

Print(date ,time ," 60 MIN UP , DOWN ", " MEDIANA " , value8:2 of data3 , "MEdie" , " " , value9:2 of data3, " ", value10:2 of data3, " ", value11 :2 of data3);
See pics : immagine1

Code: Select all


//CODE 2
var:gg(0,data3);

gg=(low of data3 + high of data3)/2;

value9=Average((low of data3 + high of data3)/2,13)[8] of data3;
value10=Average((low of data3 + high of data3)/2,8)[5] of data3;
value11=Average((low of data3 + high of data3)/2,5)[3] of data3;

Print(date ,time ," 60 MIN UP , DOWN ", " MEDIANA " , value8:2 of data3 , "MEdie" , " " , value9:2 of data3, " ", value10:2 of data3, " ", value11 :2 of data3);
See pics : immagine2

In CODE2 i've replaced the contents of the variable "gg" in the assignment

This two code are applicated to "image GRAPH"(see pics)

The code correct is CODE2.....i thinks the problem is [8] [5] [3] after Average

how can I set up the code correctly using the variable "gg"?
Attachments
Image GRAPH.png
Chart
(142.63 KiB) Downloaded 549 times
Immagine2.png
CODE2
(150.42 KiB) Downloaded 552 times
Immagine1.png
CODE1
(153.1 KiB) Downloaded 556 times

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Problem Multiframe

Postby TJ » 21 Sep 2014

I obtained the same results.

Please see attached.

Image

Image
Attachments
36 2014-09-21 10.29.jpg
(129.52 KiB) Downloaded 660 times
2014-09-21 10.30.jpg
(224.64 KiB) Downloaded 666 times

turbofib
Posts: 213
Joined: 11 May 2013
Has thanked: 67 times
Been thanked: 1 time

Re: Problem Multiframe

Postby turbofib » 21 Sep 2014

Code: Select all



var:gg(0,data3);

gg=(low of data3 + high of data3)/2;

value9=Average(gg ,13)[8] of data3;
value10=Average(gg ,8)[5] of data3;
value11=Average(gg,5)[3] of data3;



value20=Average((low of data3 + high of data3)/2,13)[8] of data3;
value21=Average((low of data3 + high of data3)/2,8)[5] of data3;
value22=Average((low of data3 + high of data3)/2,5)[3] of data3;

Print(value9-value20, value10-value21,value11-value22);
i have different result..
Do you have create chart correctly? (see chart2)
Attachments
CHART2.png
(133.21 KiB) Downloaded 554 times
TJ_TEST.pla
(2.52 KiB) Downloaded 439 times
Immagine GRAPH1.png
(80.97 KiB) Downloaded 554 times

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Problem Multiframe

Postby TJ » 21 Sep 2014

::
i have different result..
Do you have create chart correctly? (see chart2)
Ok... I see that you have edited your post and added a chart.

Give this a try:

Code: Select all

if barstatus(3)=2 then
begin

gg=(low of data3 + high of data3)/2 ;

value9 = Average(gg, 13)[8] of data3;
value10 = Average(gg, 8)[5] of data3;
value11 = Average(gg, 5)[3] of data3;

end;

plot100(value9, "9"); // thick red line
plot101(value10, "10"); // thick red line
plot102(value11, "11"); // thick red line

turbofib
Posts: 213
Joined: 11 May 2013
Has thanked: 67 times
Been thanked: 1 time

Re: Problem Multiframe

Postby turbofib » 22 Sep 2014

ok.....see pics.....
Attachments
screenshot_251.png
(139.74 KiB) Downloaded 563 times

turbofib
Posts: 213
Joined: 11 May 2013
Has thanked: 67 times
Been thanked: 1 time

Re: Problem Multiframe

Postby turbofib » 22 Sep 2014

I still have not figured out what's wrong in my indicator...
With your last post I don't understand what I needed to see

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Problem Multiframe

Postby TJ » 22 Sep 2014

I still have not figured out what's wrong in my indicator...
With your last post I don't understand what I needed to see
Have you compared it to your "correct" lines?

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Problem Multiframe

Postby TJ » 22 Sep 2014

You can apply the indicator to data3 if you want the line to plot based on data3 interval. (ie smooth line)

Format Study > Property > Based Study On

turbofib
Posts: 213
Joined: 11 May 2013
Has thanked: 67 times
Been thanked: 1 time

Re: Problem Multiframe

Postby turbofib » 22 Sep 2014

I still have not figured out what's wrong in my indicator...
With your last post I don't understand what I needed to see
Have you compared it to your "correct" lines?
yes....the lines is correct....
The problem is the print..(if i don't apply "base study on chart 3")

thanks


Return to “MultiCharts”