graftonian 1,089 posts msg #124244 - Ignore graftonian modified |
7/3/2015 10:00:02 AM
I have been exploring the idea of trading between UPRO and SPXU using the following code:
/*UPRO-SPXU OSCILLATOR*/
SYMLIST(UPRO,SPXU)
SET{HiRSI, 90}
SET{LoRSI, 8.5}
DRAW RSI(2)
DRAW RSI(2) LINE AT LoRSI
CHART-TIME IS 6 MONTHS
SET{LoHits, COUNT(RSI(2) < LoRSI, 120)}
ADD COLUMN LoHits
DRAW RSI(2) LINE AT HiRSI
SET{HiHits, COUNT(RSI(2) > HiRSI, 120)}
ADD COLUMN HiHits
SET{T1, COUNT(RSI(2) < LoRSI,1)}
SET{T2, COUNT(RSI(2) > HiRSI,1)}
/*T{TRIGGER, T1 + T2}*/
/*TRIGGER > .90*/
ADD COLUMN SEPARATOR
ADD COLUMN T1{BUY}
ADD COLUMN T2{SELL}
ADD COLUMN RSI(2)
Trouble is I must set HiRSI and LoRSI manually to keep HiHits and LoHits around some desired level.
Question: Is there a way to automate this? I have manually backtested this, keeping LoHits and HiHits around 10 for the previous 120 days, with good results
How about coding this in StrataSearch? I am in my 30 days trial period.
Comments please,
Duane
|