PDA

View Full Version : How to program Higher-High Higher-Low


TickJob
08-20-2007, 07:10 PM
How to program to identify HH (Higher High) or LL (Lower Low) or LH (Lower High) or Higher Low( HL) above and below each Peak as shown in below chart?

NinjaTrader_Ray
08-20-2007, 07:14 PM
Hi TickJob,

I am unsure at what level of programmer you are but you can start with our Indicator Development tutorials located in our help guide under the NinjaScript section. This will give you a foundation for programming indicators in NinjaTrader.

Checking for higher highs can be done like:


if (High[0] > High[1])
Print("We have a higher high");

if (Low[0] < Low[1])
Print("We have a lower low");

TickJob
08-20-2007, 08:37 PM
Hi Ray,

Thanks for your reply. I have some knowledge on C#.
with reference to my chart, I am looking for the "peak" form by many bars, not next bar higher or lower.

NinjaTrader_Ray
08-21-2007, 06:47 AM
The Swing indicator will give you values for the most recent peaks and troughs. It will give you a value representing bars ago for most recent swing points.

Additional reference information is located here - http://www.ninjatrader-support.com/HelpGuideV6/helpguide.html?WelcomeToNinjaTrader