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

Forums>AlgoWizard / EA Wizard>Application Support>Why does trade not open at open of the bar?

  • #113400 |
    Customer
    31 Posts

    Hi,

     

    I have a very simple code which should open a trade when conditions are met ONLY at the open of a bar and close at the same bar.

     

    It closes indeed at the close, however it opens not at the open but at a price I cannot trace. Please help!

     

    Regards,

     

    Dennis

     

    If (IsBarOpen is True) && (((Close[2] > Close [1]) and ( Market Position() is Flat) And (IsBarOpen is True))))

     

    THEN

     

    Buy 0.1 Lots at market

     Magicnumber= 1000;

    Close position after 1 bars

     

    End If;

     

     

    #129063
    Mark Fric
    Administrator
    1182 Posts

    it should open the trade at bar open. I tested it in MT4 and it works, I cannot imagine what could be wrong in your case.

     

    Are you trading it on MT4? When are the trades opened, does it take long from open since they are opened?

    Mark
    StrategyQuant architect

    #129102
    Customer
    168 Posts

    Hello,

     

    Can You provide strategy file? Then we can see source.

    btn_viewmy_160x33.png

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.