2. Took the same strategy and removed the short signal and re-added the short signal exactly as it appeared before.
3. It retests nicely symmetrical.
I think it has to do with the UI_MODE. It comes out of builder on the short side with the wrong UI_MODE and you can't see it in algowizard but you can see it in the xml.
These two strats appear the same in the AW but they test differently and the xml is subtly different.
P.S. Normally we could work around this bug by specifying the uimode inside the parameters of the block but sadly we also have this bug causing the parameters not to be respected: https://roadmap.strategyquant.com/tasks/sq4_9294
(I have default Parameters for Ulcer Down rising but the builder isn't respecting the UI_MODE setting. Scroll down for screenshots.)
EDIT, REGARDING THE ATTACHED STRATEGIES
ulcer-broken-9
This is how it comes from the builder and it is broken. It does not behave symmetrically in SQX. It produces unsymmetrical mql code. It has an erroneous "Mode" specified in the XML. It looks normal in Pseudocode but it is broken.
ulcer-broken-10
This is how it comes if you build it in algowizard and set up the "Mode" properly. It is correctly functioning. It behaves symmetrically. It gives the correct mql5 code. It has the correct "Mode" specified in the XML. It looks like the same pseudocode as the one above but this strategy is actually functioning properly.
We need the builder to build them like the ulcer-broken-10 file. The only difference between these two files that I can find is the XML
Attachment ulcer-broken-9.sqx added
Attachment ulcer-broken-10.sqx added
Attachment Screenshot_174.png added
Attachment Screenshot_173.png added
Subject changed from Corrupted Ulcer Strategy coming from builder with wrong UI_MODE for short side to 136 dev 4 - Corrupted Ulcer Strategy coming from builder with wrong UI_MODE for short side
Description changed:
2. Took the same strategy and removed the short signal and re-added the short signal exactly as it appeared before.
3. It retests nicely symmetrical.
I think it has to do with the UI_MODE. It comes out of builder on the short side with the wrong UI_MODE and you can't see it in algowizard but you can see it in the xml.
These two strats appear the same in the AW but they test differently and the xml is subtly different.
P.S. Could be related to this: https://roadmap.strategyquant.com/tasks/sq4_9294
because yeah, I have default Parameters for Ulcer Down rising but the builder isn't respecting the UI_MODE setting.
Attachment Screenshot_177.png added
Attachment Screenshot_176.png added
Attachment Screenshot_175.png added
Ulcer index je indikator ktory ma dva mody. Long / Short.
Malo by to by takto.
Mam
UI(Mode,Period)
UI(1,24)>0
tak short by mal byt
UI(2,24)<0
Su dve riesenia:
1)ze to njak vies ohandlovat
2)alebo ho rozdelime na dva indikatory na Long a Short verziu
ide o to ze ked pojde v builderi tento indy tak on vzdy bude hladat opositne bloky s v rovnaom mode. A nie v druhom mode.
Status changed from Fixed to In progress
Attachment Screenshot_317.png added
Status changed from In progress to Fixed
It works correctly including XMl for simple UlcerIndex snippet.
Attachment Screenshot_324.png added
Attachment Screenshot_325.png added
Attachment ulcer-broken-9.sqx added
Attachment ulcer-broken-10.sqx added
Attachment dev6-fresh-broken-example.sqx added
P.S. Hardcoding the mql5 translation code to look right will not fix the underlying issue. This strategy is still behaving incorrectly in SQX as well so, whatever is causing that needs to be fixed, from here it looks like the XML is causing the problem because that is the only difference I can see between a working correctly (in SQX) strategy and a broken one (files ulcer-broken-9 and ulcer-broken-10)
Because it uses explicit mode, for example: Ulcer Index Down is rising
it doesn't make sense for Mode to be configurable at all.
I'm removing the Mode parameter in these snippets - I tested it and it shouldn't make any problems in build, retest and templates.
If the parameter is there from older strategy, it is simply ignored, and proper fixed mode is used.