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

Forums>AlgoWizard / EA Wizard>General Discussion>HOW TO SET EA TO OPEN ORDER IN OPPOSITE DIRECTION

  • #113598 |
    Participant
    149 Posts

    HI

     

    I have buy new stragey E.A, i try to set some method in E.A but i have fail one thing, i want to set in E.A to open trade in opposite

     

    direction if will close in loss,

     

     example, if the first positon open is long position and close at loss, so I want E.A after see that it close

     

    with loss to open immediately in opposite direction in order to copersate loss.

    So please help me how to set this strategy in Quanty E.A Wizard

    #129820
    Mark Fric
    Administrator
    1182 Posts

    so this EA is an external strategy?

    Maybe something like this:

     

    IF    

    Last Order was Long

    and

    Closed PL (your order magic number, 0) < 0     <— this returns PL of the very last order

     

    THEN

    Enter at market(Short, etc.)

    Mark
    StrategyQuant architect

    #129824
    Participant
    149 Posts

    thanks for your explanation,

     

    but can do a favour for me to shows step by step, be couse am new customer, so if i was set is long and buy with loss, so where i will put strategy that if will

     

    close with loss, open short with profit ? but one thing am use bollinger band to set my strategy in long and short, but i have experience that both long and short

     

    have some loss, so i want if one of the position is open may be long and close with loss i want E.A to open possition immediatelly in opposite direction in order to

     

    compansate,

     

    and the same to short position,

     

    Am wait for your help ? thanks

    #129838
    Participant
    149 Posts

    HI

    Please there any one can answer my question

    #130151
    Moderator
    1559 Posts

    Hi msophe,

     

    from what I understand I tried to make an example of how EA rules could work for you.

    1. Go long – if last candle closes above upper Bollinger band
    2. Go short – if last candle closes below lower Bollinger band
    3. Revers short – if Long position closed with loss, go short
    4. Revers long – if Short position closed with loss, go long

    For the simplicity I added profit-target 20 pips and stop-loss 10 pips for each order.

    Notice magic numbers marked with arrows. It needs to be set correctly.

     

     

    Attachments in this forum are visible only for registered users.
    Attachments in this forum are visible only for registered users.
    Attachments in this forum are visible only for registered users.
    Attachments in this forum are visible only for registered users.
Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.