Increase positionsize with every new bar
1 replies
Jannik Behrens
8 years ago #217750
Hey Guys!
I just startet building EAs with EA Wizard and i want to transform some of my Strategies I wrote in ProCode.
The strategy: As long as the parameters give a long signal, it should open a new long order with every new bar.
So if the long signal is given from 9 – 10, I should end with 12 long positions (M5 Chart).
My Problem is the increasing of the positionsize. The first signal works and ends in a long order, but then nothing comes after it.
Do I have to make a own rule with own magic number for every step? Like one for the first position, one for the second, one for the third…
Thank you in advance and best regards!
0
Tomas Matejka
8 years ago #217757
Hello,
the problem could be a duplicate magic number. You cannot open another order having the same magic number. Solution to this is to assign a variable for magic numbers. With each order opened you can assign magic = magic + 1 or you can use a randomly generated magic number (see example attached)
Let me know if you need any help with this
0
Viewing 1 replies (of 1 total)