ATR using the opposite blocks file not symmetrical and not following the opposite blocks specified

I have an oppositeblocks.csv file in place. Putting it in fixed the ADX bug however ATR does not seem to be following the oppositeblocks rules....


From my oppositeblocks.csv file:

ATR;ATR
ATRChangesDown;ATRChangesDown
ATRChangesUp;ATRChangesUp
ATRCrossDown;ATRCrossDown
ATRCrossUp;ATRCrossUp
ATRFalling;ATRFalling
ATRHigher;ATRHigher
ATRLower;ATRLower
ATRRising;ATRRising

From results source tab:

//--------------------------------------------------------------------
// Trading rule: Trading signals (On Bar Open)
//--------------------------------------------------------------------
LongEntrySignal = (((ADX(Main chart,50)[1] is falling for 17 bars)
and (StdDev(Subchart1, D1,31)[1] < 0.4))
and (ATR(Subchart2, M15,36)[1] is rising for 15 bars));

ShortEntrySignal = (((ADX(Main chart,50)[1] is rising for 17 bars)
and (StdDev(Subchart1, D1,31)[1] > -0.4))
and (ATR(Subchart2, M15,36)[1] is falling for 15 bars));

LongExitSignal = ((Open below LinReg(Main chart,30) after opened above
and (HeikenAshiLow(Subchart1, D1)[1] crosses below LowDaily(Subchart1, D1)[1]))
and (KeltnerChannel(Subchart2, M15,23, 0.4).Lower[1] crosses below SMMA(Subchart2, M15,38)[1]));

ShortExitSignal = ((Open above LinReg(Main chart,30) after opened below
and (HeikenAshiHigh(Subchart1, D1)[1] crosses above HighDaily(Subchart1, D1)[1]))
and (KeltnerChannel(Subchart2, M15,23, 0.4).Upper[1] crosses above SMMA(Subchart2, M15,38)[1]));

Attachments
OppositeBlocks.csv
(11.49 KiB)
Build-opatr-bug.cfx
(10.75 KiB)
Strategy 0115-opatr-bug.sqx
(62.11 KiB)
  • Votes 0
  • Project StrategyQuant X
  • Type Bug
  • Status Refused
  • Priority Normal

History

b
#1

bentra

05.08.2019 06:37

Task created

MF
#2

Mark Fric

06.08.2019 08:14

Status changed from New to Refused

Attachment bblocks.jpg added

it is like this because there are two ways how you can get this condition.

You can use block [ATR is rising] - then you can control tits negation using OppositeBlocks.csv

or

you can use multiple blocks [ATR][Is rising] - then you cannot control the negation.


So the solution is simple, if you want to have negation defined in the day you want use Predefined conditions and don't use individual indicators and comparisons.



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