|
----- Original Message -----
From: Jim White
Sent: Friday, December 23, 2005 2:00 PM
Subject: Re: [TradeStation_Forum] Holiday gift Rolando,
I use the latest version of TS so can't give it in
any other format but would be happy to post the code for you.
Input:runlen(4),Runlen2(26),runlen3(78),runlen4(234),AvgLen(234);
VARS:Runtotal(0),Runtotal2(0),runtotal3(0),runtotal4(0),totalruntotal(0),AvgRun(0),color1(blue),COLOR2(BLUE), NETTICKPrice(0); NETTICKPrice = (upticks - downticks) * (close-close[1]); runtotal = Summation(nettickprice,runlen); runtotal2 = Summation(nettickprice,runlen2); runtotal3 = Summation(nettickprice,runlen3); runtotal4 = Summation(nettickprice,runlen4); totalruntotal = runtotal + runtotal2 + runtotal3 + runtotal4; AvgRun = xaverage(xaverage(totalruntotal,Avglen),Avglen); If avgrun >avgrun[1] then color1 = blue; if avgrun < avgrun[1] then color1 = red; iF TOTALRUNTOTAL > TOTALRUNTOTAL[1] THEN COLOR2=BLUE; If totalruntotal < totalruntotal[1] then color2 = red; plot1(totalruntotal,"runtotal",color2); plot2(avgrun,"avgrun",color1); if totalruntotal crosses above avgrun then Alert("4runtotalbuy") else if totalruntotal crosses below avgrun then Alert("4runtotalsell"); Jim
YAHOO! GROUPS LINKS
|