rajatheroyal
Junior member
- Messages
- 12
- Likes
- 0
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;
{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;