PDA

View Full Version : Peaks


cptrader
11-08-2008, 08:24 AM
I have been experimenting with code to identify peaks in my charts
The following formula identifies the last peak.
What would I need to change so that all peaks on the chart are shown

if (Close[1] > High[2] && Close[0] < Low[1])
{DrawText("my tag20", "Pk", 0, High[0]+TickSize*5, Color.Black) ;}

Thanks

Craig

NinjaTrader_Ray
11-08-2008, 08:51 AM
Try this:

DrawText("my tag20" + CurrentBar, "Pk", 0, High[0]+TickSize*5, Color.Black)