Why no short trades are produced?
Author: mrsic
Creation Date: 3/18/2018 12:15 PM
profile picture

mrsic

#1
Hi,

could anyone find the error why i am getting no short trades, please. I can't find it. Thanks.

CODE:
Please log in to see this code.


greetings

profile picture

Cone

#2
One or more of your 13 or so sliders are set to values that don't allow the ShortAtMarket() statement to be executed.
profile picture

Eugene

#3
I think that the reason may be in incorrectly positioning the Short logic block inside the Long logic block. This creates a mutually exclusive condition which is unlikely to ever trigger.

Move this entire block outside of "if (CumDown.Value..."
CODE:
Please log in to see this code.
profile picture

mrsic

#4
QUOTE:
I think that the reason may be in incorrectly positioning the Short logic block inside the Long logic block. This creates a mutually exclusive condition which is unlikely to ever trigger.

I think the logic for a Mean-Reversion-System is correct.

QUOTE:
One or more of your 13 or so sliders are set to values that don't allow the ShortAtMarket() statement to be executed.

that was also my first thought but I have tried it with several values. That is the whole Strategy.

CODE:
Please log in to see this code.
profile picture

Eugene

#5
QUOTE:
I think the logic for a Mean-Reversion-System is correct.

This would be correct:

CODE:
Please log in to see this code.


What you have in your code is incorrect:

CODE:
Please log in to see this code.


Do you see it now?
profile picture

mrsic

#6
I think now is correct. Could you check this for me Eugene.
CODE:
Please log in to see this code.
profile picture

Eugene

#7
On the surface the structure looks OK .
profile picture

mrsic

#8
Thanks.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).