Only Long Trades being Processed - even though code is for both long and short

Hello


I have a builder setting for when the market is non trending (ADX <20)


The strategies processed in the results are only ever long strategies, regardless of entry types (stop, market, limit etc).


I looked at the code generated, it seems to me that when short entries are evaluated they are not executed because both the initial entry criteria are true (adx <20) and the code for short entries checks that 



&& (!(LongEntrySignal))))



I was hoping you could look at this please.


I think I understand the logic of this as you don't want code that is trying to go both long and short at the same time, however I think there are systems which would have the same initial entry criteria but not execute a trade at the same time.


For example: 


If i have a breakout entry with a stop price and code is similiar to below then long and short would not trade at the same time



Long Criteria:ADX < 20


Long Entry:Upper Bollinger Band + 2 * atr(20)


Short Criteria:ADX < 20


Short Entry:Lower Bollinger Band - 2 * atr(20)





Thankyou



Attachments
Build with ADX Bug.cfx
(21.89 KiB)
  • Votes +1
  • Project StrategyQuant X
  • Type Bug
  • Status Refused
  • Priority Normal

History

SB
#1

sbecm

28.09.2019 00:54

Task created

b
#2

bentra

28.09.2019 21:11
Many strategies are coming in this way from the builder by default. This is another example of SQX not being symmetrical. The SQX team do not consider this a bug. The response was "All markets have a long bias."
https://strategyquant.com/forum/topic/what-should-happen-when-short-and-long-signals-fire-at-the-same-time/
https://strategyquant.com/forum/topic/symmetry-needs-just-a-little-more-love-and-here-are-some-workarounds/

Sorry, but we are forced to use a template to get closer to actual symmetry. You can use a template to change this code: && (!(LongEntrySignal))))
SB
#3

sbecm

29.09.2019 08:00
Voted for this task.
TB
#4

Tomas Brynda

06.05.2020 13:26

Status changed from New to Refused

Hi,

we have discussed this issue and came to a conclusion that you can quite easily create a template to be used in builder.

You can create the bare skeleton with a few rules and then use random condition blocks in this template and it will produce strategies with the logic you want.


Best regards,

Tomas


Votes: +1

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please