Bug in Multicharts Indicators SQ_isFalling and iSQ_sRising

I was replicating SQ_isFalling and SQ_isRising indicators in backtrader engine.

And I think I have found a bug, based on my view how it should work.
So based on my view it should count rising sequence or falling sequence >= bars.
It is actually implemented to count rising sequence or falling sequence >= bars-1.
So i think it might be a bug.

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

History

KP
#1

CooleRnax

18.10.2019 22:03

Task created

TB
#2

Tomas Brynda

07.11.2019 14:55

Status changed from New to Refused

Hi CoolerNax,

it is a good point. You are right, our implementation checks one bar less than it should. 

For example if checking IsRising with BarCount = 3, we check that X2 < X1 < X0, so we are basically checking last 3 values, but it is true if at least 2 last bars are rising.


We are using this implementation from the very beginning and in all supported platforms. 

It is easy to change that, but it would have an impact on many existing strategies, so we think it's better to let it this way and just keep in mind, that one should user barcount + 1 when creating strategies manually.


Best regards,

Tomas




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