The EDS... those that don't have AIQ, cannot use RSI AIQ which is normal RSI , but using and exponentially smothed average. It's an "engineered to fit" arbitration so is not really important. CCI,TCI VEL, are aiq indicators and are also used in arbitration to deal with tricky situations and try and second guess continuation or reversal.This system is "always in the market" . This is not de-bugged...Have fun
short is 7.
MA is simpleavg([close],short,0). ! Define 7 day moving average.
lowup if val([low],1)<[low] . ! higher low yesterday?
risky1 if [high]>val([open],1)and [close]>val([low],1).
! Four possibilities of open and close wr.t. Moving average
Up if [st ma]>val([st ma],1). !MA is up trend from yesterday
Down if [st ma]<val([st ma],1). !MA is down trend from yesterday
Rule1 if [open]>ma and [close]>ma and up. !open candle
Rule2 if [open]<ma and [close]>ma and up. !open candle
Rule3 if [open]>ma and [close]<ma and up. !closed candle
Rule4 if [open]<ma and [close]<ma and (up or risky1). !closed candle
Rule1a if [open]>ma and [close]>ma and down. !open candle
Rule2a if [open]<ma and [close]>ma and down. !open candle
Rule3a if [open]>ma and [close]<ma and down. !closed candle
Rule4a if [open]<ma and [close]<ma and down. !closed candle
!******************************************
Rule5 if [rsi aiq] >val([rsi aiq],1). !RSA > yesterday .......Arbitration...
Rule5a if [rsi aiq]>val([rsi aiq],2). !RSA > 2 days ago
Rule6 if [rsi wilder]>val([rsi wilder],1). !RSW > yesterday
Rule6a if [rsi wilder]>val([rsi wilder],2). !RSW> 2 days ago
Rule5b if rule5 or rule5a.
Rule6b if rule6 or rule6a.
rule7 if rule5b or rule6b.
!*******************************************
tciup if Val([TCI],1)<[tci].
cciup if val([cci],1)<[cci].
velup if [velocity]> val([velocity],1).
Keep if cciup or tciup or velup.
BuyDow if (Rule1
OR Rule2 and (rule5 or rule6)
OR Rule3 and rule7
OR Rule4 and rule7)and lowup.
SellDow if Rule4a
OR Rule2a and not (rule5 or rule6)
OR Rule3 and not rule7
OR Rule4 and not rule7.
!out if [close]<[open].
!Phasedown if Val([phase],1) > [Phase].
!mcd if Val([macd osc],1)>[macd osc]*1.1.
!tci if Val([TCI],1)>[tci].
!cci if val([cci],1)>[cci].
!vel if val([velocity],1)>[velocity].
!sellDow if tci or cci or vel or out.