Not logged in
Viewing 2 posts - 1 through 2 (of 2 total)

Forums>AlgoWizard / EA Wizard>Make my EA>Increase positionsize with every new bar

  • #217750 |
    Participant
    1 Posts

    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!

    #217757
    tomas262
    Administrator
    1827 Posts

    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

    Attachments:
    You must be logged in to view attached files.
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.