SQ4 RC1 - Bar Day of Week incorrectly inverts rule for Long and Short

See below, when using the Bar Day of Week building block, random generation negates the rule for the opposite trade.  This is clearly incorrect and the strategies generated only trade then in one direction.


//--------------------------------------------------------------------
// Trading rule: Trading signals (On Bar Open)
//--------------------------------------------------------------------                   
LongEntrySignal = ((((((Bar closes below Exponential Moving Average(Main chart,50))
   and (Bar Closes below KeltnerChannel(Main chart,67, 2.7).Lower))
   and (Bar closes below Smoothed Moving Average(Main chart,50)))
   and (Bar Day of Week != 0))
   and (Bar Day of Week != 6))
   and (Bar closes below Simple Moving Average(Subchart1, H1,50)));


ShortEntrySignal = ((((((Bar closes above Exponential Moving Average(Main chart,50))
   and (Bar Closes above KeltnerChannel(Main chart,67, 2.7).Upper))
   and (Bar closes above Smoothed Moving Average(Main chart,50)))
   and (Bar Day of Week = 0))
   and (Bar Day of Week = 6))
   and (Bar closes above Simple Moving Average(Subchart1, H1,50)));


LongExitSignal = (((Bar closes above Simple Moving Average(Main chart,50))
   and (Bar Day of Week != 4))
   and (Bar Closes below KeltnerChannel(Subchart1, H1,20, 2.5).Lower));


ShortExitSignal = (((Bar closes below Simple Moving Average(Main chart,50))
   and (Bar Day of Week = 4))
   and (Bar Closes above KeltnerChannel(Subchart1, H1,20, 2.5).Upper));

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

History

m
#1

mikeyc

15.05.2018 08:27

Task created

MF
#2

Mark Fric

15.05.2018 10:11

Status changed from New to Fixed

modified default negation so that Bar Day Of Weeks is not negated to opposite

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