## KING KELTER system code

This is a discussion on KING KELTER system code within the Trading Systems forums, part of the Methods category; Hi guys , i was reading building winning trading sytems with tradestationbook there a code is given for King Kelter ...

 Jul 21, 2009, 5:16pm #1 Joined May 2008 KING KELTER system code Hi guys , i was reading building winning trading sytems with tradestationbook there a code is given for King Kelter system but the code is not working can any body tell me why? {King Keltner by George Pruitt?based on trading system presented by Chester Keltner} Inputs: avgLength(40), atrLength(40); Vars: upBand(0),dnBand(0),liquidPoint(0),movAvgVal(0); movAvgVal = Average((High + Low + Close),avgLength); upBand = movAvgVal + AvgTrueRange(atrLength); dnBand = movAvgVal - AvgTrueRange(atrLength); if(movAvgVal > movAvgVal[1]) then Buy ("KKBuy") tomorrow at upBand stop; if(movAvgVal < movAvgVal[1]) then Sell Short("KKSell") tomorrow at dnBand stop; liquidPoint = movAvgVal; If(MarketPosition = 1) then Sell tomorrow at liquidPoint stop; If(MarketPosition = -1) then Buy To Cover tomorrow at liquidPoint stop;
Jul 21, 2009, 5:35pm   #2

Joined Jun 2007
Quote:
 Originally Posted by rajatheroyal if(movAvgVal > movAvgVal[1]) then Buy ("KKBuy") tomorrow at upBand stop;
funnily enough, I usually take the exact opposite of your signal, as my Exit.

whoreses for corsets ......
__________________
my Opinion is never "humble "

karl6666: 'Why doesnt anybody like you R_E, is it because you shout?'

 Jul 21, 2009, 7:32pm #3 Joined Jan 2008 Looks like older EL code. Maybe this will work: Inputs: avgLength(40), atrLength(40); Vars: upBand(0),dnBand(0),liquidPoint(0),movAvgVal(0); movAvgVal = Average((High + Low + Close),avgLength); upBand = movAvgVal + AvgTrueRange(atrLength); dnBand = movAvgVal - AvgTrueRange(atrLength); if(movAvgVal > movAvgVal[1]) then Buy ("KKBuy") Next Bar at upBand stop; if(movAvgVal < movAvgVal[1]) then Sell Short("KKSell") next bar at dnBand stop; liquidPoint = movAvgVal; If(MarketPosition = 1) then Sell next bar at liquidPoint stop; If(MarketPosition = -1) then Buy to cover next bar at liquidPoint stop;
 Jul 22, 2009, 12:12am #4 Joined May 2008 i tried that but its not working only the first signal is comming in chart.
 Jul 22, 2009, 8:30am #5 Joined Jan 2008 Is the code working now? If you get a signal on the chart, the code is working. Whether the startegy works that is another issue. Also, it would be nice if you had started you reply as follows: "Thank you, i tried that but its not working only the first signal is comming in chart. " Saying a little thank you to someone who is trying to help you for free does not cost anything.
 Jul 22, 2009, 3:38pm #6 Joined May 2008 Oops i am extremely sorry.Actually i was in the irritation that the strategy was not working ,i forgot to say thank.It was my mistake.Thanks a lot for helping me out. (also here there is no thanks button like other sites)
 Jul 27, 2009, 12:31pm #7 Joined Jul 2009 if moving average going up/down buy at upper/lower band (band = moving average +- atr) right? __________________ PHP Code: ``` prediction 0 reaction 1  ```