DPO Detraend Price Oscilator Bug

DPO is directional with a zero baseline so:

//--------------------------------------------------------------------
// Trading rule: Trading signals (On Bar Open)
//--------------------------------------------------------------------                   
LongEntrySignal = Detrended Price Oscillator(Main chart,DPOLevelPeriod1)[1] is above 0.01;


ShortEntrySignal = Detrended Price Oscillator(Main chart,DPOLevelPeriod1)[1] is below 0.01;


LongExitSignal = (Open below BollingerBands(Main chart,BBBarOpensPeriod1, 2, PRICE_MEDIAN).UpperBand
   and (CCI(Subchart1, D1,CCIPeriod1, PRICE_CLOSE)[2] is falling));


ShortExitSignal = (Open above BollingerBands(Main chart,BBBarOpensPeriod1, 2, PRICE_MEDIAN).LowerBand
   and (CCI(Subchart1, D1,CCIPeriod1, PRICE_CLOSE)[2] is rising));




Should be this:


//--------------------------------------------------------------------
// Trading rule: Trading signals (On Bar Open)
//--------------------------------------------------------------------                   
LongEntrySignal = Detrended Price Oscillator(Main chart,DPOLevelPeriod1)[1] is above 0.01;


ShortEntrySignal = Detrended Price Oscillator(Main chart,DPOLevelPeriod1)[1] is below -0.01;


LongExitSignal = (Open below BollingerBands(Main chart,BBBarOpensPeriod1, 2, PRICE_MEDIAN).UpperBand
   and (CCI(Subchart1, D1,CCIPeriod1, PRICE_CLOSE)[2] is falling));


ShortExitSignal = (Open above BollingerBands(Main chart,BBBarOpensPeriod1, 2, PRICE_MEDIAN).LowerBand
   and (CCI(Subchart1, D1,CCIPeriod1, PRICE_CLOSE)[2] is rising));



Attachments
No attachments
  • Votes +3
  • Project Extending SQ
  • Type Bug
  • Status Fixed
  • Priority Normal

History

b
#1

bentra

25.07.2022 14:45

Task created

b
#2

bentra

25.07.2022 15:20
Voted for this task.
Bt
#3

beetrader

25.07.2022 15:50
Voted for this task.
Cc
#4

Cyber

25.07.2022 16:08
Voted for this task.
IH
#5

clonex / Ivan Hudec

27.07.2022 17:03

Status changed from New to Fixed


Votes: +3

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please