Consecutive ‘and’ statements

Forums ProRealTime English forum ProOrder support Consecutive ‘and’ statements

Viewing 11 posts - 1 through 11 (of 11 total)
  • #173245

    Hello folks,

    I think someone with a bit more expertise than me will find this easy…

    I’m getting a rogue entry at 11:35 (see screengrab). I’ve graphed stochconf which is correctly false at 11:35, and yet it still enters. I suspect this is something to do with all of the consecutive ‘and’ statements, but I’ve tried juggling things around and still can’t stop it entering at 11:35 when not all of the entry rules are true.

    Does anyone know how I can solve this?

     

     

     

    #173253

    Try replacing line 26 with:

    you should be able to better spot any logical issue.

     

    1 user thanked author for this post.
    #173263

    This gives me the same result. I can’t understand why it is entering with false conditions. This is what the code looks like now:

     

    #173264

    At line 27 you change the value CurLow2 was assigned at line 7, besides changing it just after checking it at line 26.

    I don’t know if this is made on purpose or not.

     

    #173265

    Thanks for the suggestion.

    I didn’t want to change the variable there – that is a good point – I just wanted to say “Curlow 2 needs to be the lowest of the last three bars in order for there to be an entry”.

    But I’ve removed the whole of line 27 and deleted C2, and I still get the same wrong entry, so that isn’t the problem.

    I’m struggling 🙁

    #173272

    What were the TF and asset/instrument that you used in your pic above?

     

    #173277

    It’s EUR USD, 5 minute chart.

    #173288

    This works (after adding PIPSIZE conversion to the calculation of the SL):

    I can’t exactly tell you why. I can only guess it doesn’t like too many AND’s on a single line PLUS it doesn’t like both Cond and longhigherlow2 sharing the same logical value.

    2 users thanked author for this post.
    #173291

    Someone got a working itf and backtest?

     

    #173296

    There you go:

     

    #173301

    Yes, this now works.

    Thank you very much Roberto! 🙂

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

Create your free account now and post your request to benefit from the help of the community
Register or Login