PDA

View Full Version : Count Back Line ... for Guppy or Trend ???


TxTrader
04-19-2009, 06:20 AM
Greetings All,

Does anyone have a CBL CountbackLine Indicator programmed for Ninja, such as Daryl Guppy uses with his GMMA guppy Trend charts?

Or .... can anyone code one or convert one for me from a Meta file? Any other such indicators to help wth Trend Entry signals, would be much appreciated.

Thanks,,, Chris

NinjaTrader_Bertrand
04-19-2009, 06:25 AM
Hi Chris, unfortunately I'm not aware of this indicator for NinjaTrader, if you post some source code here I'm sure the community can take a look and maybe help you out converting this to NinjaScript.

If you need this custom programmed in a professional manner, please contact those - http://www.ninjatrader.com/webnew/partners_onlinetrading_NinjaScript.htm

TxTrader
04-19-2009, 08:20 AM
Hi Chris, unfortunately I'm not aware of this indicator for NinjaTrader, if you post some source code here I'm sure the community can take a look and maybe help you out converting this to NinjaScript.

If you need this custom programmed in a professional manner, please contact those - http://www.ninjatrader.com/webnew/partners_onlinetrading_NinjaScript.htm


Thanks Bertrand! - Code is below, and little more Info in attached file. Hope someone is up for the challenge! Chris :)



Formula:
CBLhi:

HighDays := Input("Enter # days to cover last HIGH for CBL calc'n:", 3, 55, 13);

If(HIGH < HHV(HIGH, HighDays), {then ...} PREV, {previous CBLhi, else...} If(Ref(L,-2) < Ref(L,-1) AND Ref(L,-2) < L AND Ref(L,-1) < L, {then ...} Ref(L,-2), {2nd day back low, else...} If((Ref(L,-3)< Ref(L,-2) AND Ref(L,-3) < Ref(L,-1) AND Ref(L,-3) < L) AND (Ref(L,-2)< L OR Ref(L,-1) < L), {then ... } Ref(L,-3), {3rd day back low, else...} If((Ref(L,-4)< Ref(L,-3) AND Ref(L,-4) < Ref(L,-2) AND Ref(L,-4) < Ref(L,-1) AND Ref(L,-4) < L) AND (Ref(L,-3)< L OR Ref(L,-2) < L OR Ref(L,-1) < L), {then... } Ref(L,-4), {4th day back low, else...} If((Ref(L,-5)< Ref(L,-4) AND Ref(L,-5) < Ref(L,-3) AND Ref(L,-5) < Ref(L,-2) AND Ref(L,-5) < Ref(L,-1) AND Ref(L,-5) < L) AND (Ref(L,-4)< L OR Ref(L,-3) < L OR Ref(L,-2) < L OR Ref(L,-1) < L), {then ...} Ref(L,-5), {5th day back low, else...} PREV )))))

and for the CBL from a LOW

CBLlo:

LowDays := Input("Enter # days to cover last LOW for CBL calc'n:", 3, 55, 13);

If(LOW > LLV(LOW, LowDays), {then ...} PREV, {previous CBLlo, else...} If(Ref(H,-2) > Ref(H,-1) AND Ref(H,-2) > H AND Ref(H,-1) > H, {then ...} Ref(H,-2), {2nd day back high,else...} If((Ref(H,-3)> Ref(H,-2) AND Ref(H,-3) > Ref(H,-1) AND Ref(H,-3) > H) AND (Ref(H,-2)> H OR Ref(H,-1) > H), {then ... } Ref(H,-3), {3rd day back high,else...} If((Ref(H,-4)> Ref(H,-3) AND Ref(H,-4) > Ref(H,-2) AND Ref(H,-4) > Ref(H,-1) AND Ref(H,-4) > H) AND (Ref(H,-3)> H OR Ref(H,-2) > H OR Ref(H,-1) > H), {then... } Ref(H,-4), {4th day back high,else...} If((Ref(H,-5)> Ref(H,-4) AND Ref(H,-5) > Ref(H,-3) AND Ref(H,-5) > Ref(H,-2) AND Ref(H,-5) > Ref(H,-1) AND Ref(H,-5) > H) AND (Ref(H,-4)> H OR Ref(H,-3) > H OR Ref(H,-2) > H OR Ref(H,-1) > H), {then ...} Ref(H,-5), {5th day back high,else...} PREV )))))

NinjaTrader_Bertrand
04-19-2009, 08:27 AM
Thanks for posting this Chris, to comment on your doc, in NinjaScript you can combine the two into one study. If you want to give this a try yourself, we have some great NinjaScript tutorials to get you started - http://www.ninjatrader-support.com/HelpGuideV6/Overview18.html

TxTrader
04-19-2009, 08:44 AM
Thanks for posting this Chris, to comment on your doc, in NinjaScript you can combine the two into one study. If you want to give this a try yourself, we have some great NinjaScript tutorials to get you started - http://www.ninjatrader-support.com/HelpGuideV6/Overview18.html

Thanks for the Link! I will try .. but am hoping someone will come to the rescue! :) Chris

Swimmy
07-09-2011, 04:21 AM
Chris,

I'm trying to find the same thing with no luck. Did you happen to get rescued or end up writing it yourself?

Anyone else out there able to point me in the right direction? Thanks.

Swimmy

TxTrader
07-10-2011, 01:23 AM
Hi Swimmy. Ooops! I had quite forgotten, but am still interested. And Nope, neither, to answer you question. <gr>

Maybe somebody would now give it a try using all the power of Ninja 7. I'm just not any good a programming - but love things Guppy. A CountbackLine Indicator would be Fantastic. Anybody care to try ... Please! :o)

Chris

Swimmy
07-12-2011, 08:49 PM
Thanks for the note. If I manage to find / create something useful I'll put it up here.