Indicator for multiple time frames

Questions about MultiCharts and user contributed studies.
stefanols
Posts: 51
Joined: 01 Jan 2014
Has thanked: 14 times
Been thanked: 2 times

Indicator for multiple time frames

Postby stefanols » 23 Jun 2016

Hi,

I am using 3 time frames and present all three with an indicator on the lowest time frame.

As it is now the highest and intermediate time frame print many dots on the lowest time frame for a specific event.

How can I program to only have one dot for each occasion it happens.

Thanks in advance.

Best regards

Stefan
Attachments
3 time frames.PNG
(7.62 KiB) Downloaded 708 times

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Indicator for multiple time frames

Postby JoshM » 24 Jun 2016

I am using 3 time frames and present all three with an indicator on the lowest time frame.

As it is now the highest and intermediate time frame print many dots on the lowest time frame for a specific event.

How can I program to only have one dot for each occasion it happens.
The how-to depends highly on your code, but basically:
If there's a dot on the previous bar, don't draw one on this bar.
You can probably check whether the plot value of the previous bar is different from x to see whether or not the dot was plotted.

(I can't provide a more helpful response here since you gave very little information to go on.)

stefanols
Posts: 51
Joined: 01 Jan 2014
Has thanked: 14 times
Been thanked: 2 times

Re: Indicator for multiple time frames

Postby stefanols » 24 Jun 2016

Hi Josh,

Yes you are right.

Below you find a code example that hopefully gives you a better picture.

How could a check look like to avoid triple or 5 fold prints due to higher time frame.

I know that I can use crosses below etc to avoid this but I can not do that with some indicators.This correspons better to the actual situation.

Thanks in advance // BR Stefan

Code: Select all

Inputs: RSIL(2);
variables: var0( 0 ),var1(0),var2(0);

var0 = RSI(Close,RSIL);
var1 = RSI(Close,RSIL) of data2;
var2 = RSI(Close,RSIL) of data3;

value11= var0;
value12= var1;
value13= var2;


Condition10= value11[0] < 10;

Condition11= value12[0] < 10;

Condition12= value13[0] < 10;


If condition10 then plot1 (7,"RSI cross < 10 time frame1",red,default,5);
If Condition11 then plot2 (8,"RSI cross < 10 time frame2",red,default,8);
If Condition12 then plot3 (9,"RSI cross < 10 time frame3",red,default,11);
Attachments
RSi plots.png
Should only plot once each time.
(18.12 KiB) Downloaded 694 times


Return to “MultiCharts”