Plotting an indicator from 600tick on the 3600tick chart?

Questions about MultiCharts and user contributed studies.
tryingitout
Posts: 11
Joined: 26 Feb 2014
Has thanked: 5 times

Plotting an indicator from 600tick on the 3600tick chart?

Postby tryingitout » 03 Oct 2014

Is it possible to plot a simple indicator...say HLC/3 from 600 tick on the 3600 tick chart?

So in other words, as the next bars 600 ticks HLC/3 plots...it re-draws the new HLC/3 on the 3600 tick chart?

Thank you if reading.

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

Re: Plotting an indicator from 600tick on the 3600tick chart

Postby TJ » 03 Oct 2014

Is it possible to plot a simple indicator...say HLC/3 from 600 tick on the 3600 tick chart?
So in other words, as the next bars 600 ticks HLC/3 plots...it re-draws the new HLC/3 on the 3600 tick chart?
Thank you if reading.
Not sure what you want.

Can you draw a diagram?

User avatar
bensat
Posts: 331
Joined: 04 Oct 2014
Has thanked: 46 times
Been thanked: 104 times

Re: Plotting an indicator from 600tick on the 3600tick chart

Postby bensat » 04 Oct 2014

So you would like to get it updated 6 times in the current 3600 tick bar ?
Or do you mean you would like to get the 3600 tick bar HLC/3 drawn in the 600 tick chart ?

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

Re: Plotting an indicator from 600tick on the 3600tick chart

Postby JoshM » 04 Oct 2014

So in other words, as the next bars 600 ticks HLC/3 plots...it re-draws the new HLC/3 on the 3600 tick chart?
I assume that, as Bensat points out, you want to have it updated 6 times on a 3600 tick chart.

One way to do this (example to get you started) would be:

Code: Select all

Variables:
IntraBarPersist tickCounter(0),
IntraBarPersist plotValue(0);

if (BarStatus = 2) then
tickCounter = 0;

tickCounter = tickCounter + 1;

if (Mod(tickCounter, 600) = 0) then begin

// This code block is executed every 600 ticks.
// When added to a 3600 tick chart, it simulates
// the bar on close calculation that otherwise
// would happen on the close of the 600 tick chart.

// Calculate the new plot value to 'redraw' the plot
plotValue = (High + Low + Close) / 3;
end;

Plot1(plotValue);

tryingitout
Posts: 11
Joined: 26 Feb 2014
Has thanked: 5 times

Re: Plotting an indicator from 600tick on the 3600tick chart

Postby tryingitout » 04 Oct 2014

Thank you TJ, Bensat & JoshM.

I wanted to see if I could get the 600 ticks HLC/3 updated 6 times and to re-draw it 6 times on the 3600 tick chart? So the 3600 tick chart will have this HLC/3 moving automatically as the new 600 tick's HLC/3 was printed.

I will see if this code will work when I get live data.

Thank you very much.

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: Plotting an indicator from 600tick on the 3600tick chart

Postby Andrew MultiCharts » 06 Oct 2014

Hello tryingitout,

If the symbols is the same, you can add 600 ticks as data2, base your indicator on data2, set it to update only on bars' closes and move the visual plot to your 3600 ticks data1.


Return to “MultiCharts”