SQX 108 - RSI levels are the same long and short always

Hi Mark,



When using the RSI building block, the levels are always the same long and short:


//--------------------------------------------------------------------
// Trading rule: Trading signals (On Bar Open)
//--------------------------------------------------------------------                   
LongEntrySignal = ((((RSI(Main chart,14)[1] crosses above 65)
   and (StdDev(Main chart,14) < 0.5901))
   and (StdDev(Main chart,50) < 0.8101))
   and Open above BollingerBands(Main chart,77, 2.4).UpperBand after opened below);


ShortEntrySignal = ((((RSI(Main chart,14)[1] crosses below 65)
   and (StdDev(Main chart,14) < 0.5901))
   and (StdDev(Main chart,50) < 0.8101))
   and Open below BollingerBands(Main chart,77, 2.4).LowerBand after opened above);


Would it be possible for RSI to have an extra parameter (0 to 99) which is the gap or hysteresis, so that instead, rules like this might occur? 


//--------------------------------------------------------------------
// Trading rule: Trading signals (On Bar Open)
//--------------------------------------------------------------------                   
LongEntrySignal = ((((RSI(Main chart,14)[1] crosses above 75)
   and (StdDev(Main chart,14) < 0.5901))
   and (StdDev(Main chart,50) < 0.8101))
   and Open above BollingerBands(Main chart,77, 2.4).UpperBand after opened below);


ShortEntrySignal = ((((RSI(Main chart,14)[1] crosses below 25)
   and (StdDev(Main chart,14) < 0.5901))
   and (StdDev(Main chart,50) < 0.8101))
   and Open below BollingerBands(Main chart,77, 2.4).LowerBand after opened above);


Thanks,


Mike

Attachments
No attachments
  • Votes 0
  • Project StrategyQuant X
  • Type Feature
  • Status Fixed
  • Priority Normal

History

m
#1

mikeyc

17.08.2018 15:41

Task created

m
#2

mikeyc

17.08.2018 17:37
Same applies to Williams % Range:


//--------------------------------------------------------------------

// Trading rule: Trading signals (On Bar Open)

//--------------------------------------------------------------------                   

LongEntrySignal = (((Open below BollingerBands(Main chart,50, 2.1).LowerBand after opened above

   and (StdDev(Main chart,40) < 0.7101))

   and (StdDev(Main chart,50) < 0.7101))

   and (Williams % R(Main chart,20) crosses -80.0 downwards));


ShortEntrySignal = (((Open above BollingerBands(Main chart,50, 2.1).UpperBand after opened below

   and (StdDev(Main chart,40) < 0.7101))

   and (StdDev(Main chart,50) < 0.7101))

   and (Williams % R(Main chart,20) crosses -80 upwards));

MF
#3

Mark Fric

03.09.2018 14:36

Status changed from New to Fixed

there really was an issue with this, it is now fixed



Votes: 0

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please