I wrote some code for the software that prorealtime.com uses (and IG Index), but I'm baffled by Ninja traders code.
I was wondering if someone could help me convert the following code so I can better learn exactly where the differnces are?
Before I go on, http://www.ninjatrader-support.com/H...sAndConditions talks about automatically inserting actions and conditions, but when I right click, the insert action/ condition option isn't there. Am I missing something?
Here's the code I need converting in the original format:
KC refers to the respective Keltner channels
Bollingerup is the upper bollinger band.
It's a simple binary indicator.
The second is an average of the momentum oscilator
You probably won't need the first couple of lines. They were needed because Prorealtime didnt have a Keltner channel indicator built in.
The Squeeze
UpperKC = average [20](close) + 1.5*averagetruerange[20](close)
LowerKC = average [20](close) - 1.5*averagetruerange[20](close)
condition1 = BollingerUp[20](close) < UpperKC
condition2 = bollingerdown[20](close) > LowerKC
IF Condition1 then
a=1
elsif condition2 then
a=1
else
a=0
endif
return a coloured(0,0,225)
The Momentum Oscilator
RETURN exponentialAverage[5](Momentum[12](close))
I hope someone can help. I find prorealtime to be quite logical and am hoping someone can help me by converting. I learn best this way, so sorry if it appears I'm being lazy.
Thank you for your help
Dave
Comment