Close Two Ticks Back  [SOLVED]

Questions about MultiCharts and user contributed studies.
tony
Posts: 420
Joined: 14 Jun 2013
Has thanked: 30 times
Been thanked: 81 times
Contact:

Close Two Ticks Back

Postby tony » 24 Jun 2015

I understand how to determine the close on the previous tick but am curious about the close two ticks back. Can anyone shed any insight on how to approach this.

Right now I have a variable = close which is placed at the end of my script AFTER the final end; and that value is held as "previous close" for the next script calculation on the next tick. But I was trying to do the same but for two ticks prior.

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

Re: Close Two Ticks Back  [SOLVED]

Postby TJ » 24 Jun 2015

I understand how to determine the close on the previous tick but am curious about the close two ticks back. Can anyone shed any insight on how to approach this.

Right now I have a variable = close which is placed at the end of my script AFTER the final end; and that value is held as "previous close" for the next script calculation on the next tick. But I was trying to do the same but for two ticks prior.

Code: Select all


T2 = T1;
T1 = T0;
T0 = C;

tony
Posts: 420
Joined: 14 Jun 2013
Has thanked: 30 times
Been thanked: 81 times
Contact:

Re: Close Two Ticks Back

Postby tony » 24 Jun 2015

Thanks TJ. I had been approaching this a different way. Took me a few to wrap my head around your solution and then felt like half an ass for not realizing immediately. Much appreciated and very simple solution.

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

Re: Close Two Ticks Back

Postby TJ » 24 Jun 2015

Thanks TJ. I had been approaching this a different way. Took me a few to wrap my head around your solution and then felt like half an ass for not realizing immediately. Much appreciated and very simple solution.

Simple solutions are the best solutions. :-)
Most of us overthink the problem.


Return to “MultiCharts”