[Release Candidate 3] RC2 - StdDev building block incorrect

Hi Team,



There appears to be two issues with the StdDev building block during strategy building.


First, it is incorrectly inverting the rules for Long and Short.  It is a volatility measure so the rules for long and short entry should be the same, and rules for long and short exit should be the same:


//--------------------------------------------------------------------
// Trading rule: Trading signals (On Bar Open)
//--------------------------------------------------------------------                   
LongEntrySignal = ((((Bar closes below Exponential Moving Average(Main chart,50))
   and (Bar closes above LinearWeighted Moving Average(Main chart,104)))
   and (StdDev(Main chart,50) < 0.7901))
   and (StdDev(Main chart,50) < 0.9801));


ShortEntrySignal = ((((Bar closes above Exponential Moving Average(Main chart,50))
   and (Bar closes below LinearWeighted Moving Average(Main chart,104)))
   and (StdDev(Main chart,50) > 0.7901))
   and (StdDev(Main chart,50) > 0.9801));


LongExitSignal = ((Open above BollingerBands(Main chart,104, 2.9).UpperBand
   and (Bar closes above Exponential Moving Average(Main chart,50)))
   and (StdDev(Main chart,50) < 0.5301));


ShortExitSignal = ((Open below BollingerBands(Main chart,104, 2.9).LowerBand
   and (Bar closes below Exponential Moving Average(Main chart,50)))
   and (StdDev(Main chart,50) > 0.5301));


The second issue (and this might apply to other building blocks too), is that it is ignoring the Custom Parameter settings.  See attached screenshots.  


To match usual values for EUR/USD, I set the low level for StdDev to 0.0001 and the high level to 0.001 with a step of 0.0001.  However see the rules generated above it is not using these values it is using the default values for StdDev, which is a high level maximum of 1.0


Please can you fix these two important issues.


Thanks,


Mike

Attachments
SQ4 RC2 Custom Parameters StdDev Levels.png
(47.13 KiB)
SQ4 RC2 Custom Parameters StdDev.png
(18.02 KiB)
  • Votes 0
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

m
#1

mikeyc

19.05.2018 09:37

Task created

h
#2

hankeys

19.05.2018 10:34
First, it is incorrectly inverting the rules for Long and Short.  It is a volatility measure so the rules for long and short entry should be the same, and rules for long and short exit should be the same:


thats true, not every building block should be opposite for long and short - same for ATR or ADX

MF
#3

Mark Fric

30.05.2018 08:02

Status changed from New to Fixed

m
#4

mikeyc

09.06.2018 17:23
Not fixed I'm afraid (again)


LongEntrySignal = ((((Bar Opens above KeltnerChannel(Main chart,24, 0.8).Lower after opened below)

   and (Bar opens above Simple Moving Average(Main chart,73) after opened below))

   and (Bar Opens above KeltnerChannel(Main chart,34, 0.4).Lower after opened below))

   and (StdDev(Main chart,33) < 0.0058));


ShortEntrySignal = ((((Bar opens below KeltnerChannel(Main chart,24, 0.8).Upper after opened above)

   and (Bar opens below Simple Moving Average(Main chart,73) after opened above))

   and (Bar opens below KeltnerChannel(Main chart,34, 0.4).Upper after opened above))

   and (StdDev(Main chart,33) > 0.0058));


Not sure how your automated testing is failing to pickup these issues.


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