it will only watch the last 3 peaks as the x axis moves forward
the way the code is set up is using BarsSinceSession as the positioning tool
because most of the markets i watch have relevant events that span the close i need to change the way the indicator positions the event from BarsSinceSession to CurrentBar or Count whichever would work better ...
but for some reason i'm stumped - not much programming skill -
here's two samples...
old code sample:
ThirdTopCCI = ScndTopCCI;
ThirdTopPrice = ScndTopPrice;
ThirdTopBar = ScndTopBar;
ThirdTopBarsAgo = (Bars.BarsSinceSession - ThirdTopBar);
ScndTopCCI = FirstTopCCI;
ScndTopPrice = FirstTopPrice;
ScndTopBar = FirstTopBar;
ScndTopBarsAgo = (Bars.BarsSinceSession - ScndTopBar);
FirstTopCCI = Value[1];
FirstTopPrice = High[1];
FirstTopBar = Bars.BarsSinceSession-1;
FirstTopBarsAgo = 1;
here's my stab at it using CurrentBar - which isn't working
am i just missing something about the properties of the two bar location methods ??
ThirdTopCCI = ScndTopCCI;
ThirdTopPrice = ScndTopPrice;
ThirdTopBar = ScndTopBar;
ThirdTopBarsAgo = (CurrentBar - ThirdTopBar);
ScndTopCCI = LastTopCCI;
ScndTopPrice = LastTopPrice;
ScndTopBar = LastTopBar;
ScndTopBarsAgo = (CurrentBar - ScndTopBar);
LastTopCCI = CCI[1];
LastTopPrice = High[1];
LastTopBar = CurrentBar-1;
LastTopBarsAgo = 1;
thanks,
wes
Comment