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

Forums>AlgoWizard / EA Wizard>Application Support>Move StopLoss with IsBarOpenIsTrue

  • #113710 |
    Participant
    2 Posts

    Hi Mark.

     

    Today I noticed that the EA triggered my Stop Loss 3 min after the Bar had openned (this EA uses Range Bar). At the open of that bar the condition should not be triggered because my stop loss price was less than 50 pips from the market price. In other words, the Stop Loss (Lowest(4)[0]) price at the open bar was the open price of the new bar. See rules bellow. What intrigged me was that 3 min after the bar opened the very first condition (IsBarOpenisTrue) was long gone!

     

    Shouldn’t the IsBarOpenisTrue function be triggered only in the very first tick of the bar?

     

    IF 
       IsBarOpen is True 
       Order Position ( 2 )  is Long
       BarsSinceOrderOpen ( 2 )  > 0
         
    THEN
             Move Stop Loss to:
             Magic Number: 2
             Price: Lowest(4)[0]
     

     

    My best regards

     

    Gustavo

    #130461
    Participant
    2 Posts

    Hi Mark.

     

    I found the problem :)

     

    Best regards

     

    Gustavo

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

You must be logged in to reply to this topic.