Minimum 5 Closes above SMA50

Forums ProRealTime English forum ProBuilder support Minimum 5 Closes above SMA50

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

    Hi, i’m new with coding, want to write a condition for

    • Minimum of 5 candles that closes above SMA50
    • Detect the the last Pivot high if the first condition is true.

    Thank you for your help

    #196696

    Only post in the language of the forumthat you are posting in. For example English only in the English speaking forums and French only in the French speaking forums.

    Moved from the French forum.

    Thank you 🙂

     

    #196721

    There you go:

    #197057

    Thank you

    nothing is displayed if i let this

    DEFPARAM DrawOnLastBarOnly = True

    And when i erase it , i got he signal like in the attachement.

    Can i have the signal only once when the condition is met and will repeat it when the price meet the condition once again after the next first 5 closes above SMA50?

    Thank you

    #197059

    Sorry: here are the condition:

    • C1=First 5 Closes above SMA50
    • C2=Last Pivot high when C1 is true
    • Draw segment when price cross above this last Pivot (from the pivot  to the Barindex )

    The process restart again if price closes back under SMA50 without getting C1

    Thank you

    #197078

    The code above works fine as it is written (see attached pic) and displays only on the last bar (if there’s a valid signal).

    This version will only plot AFTER 5 (or more) bars from the last signal:

    #197114

    Thank you, but i just want it to stay in the history, that’s why, if you can help me.

     

    #197115

    What’s wrong in my last code?

     

    #197117

    Ah Sorry Nicolas, i saw only the pictures attached without testing the Code, it’s wonderful, thank you a lot, you are really a Genius.

    #197120

    Sorry, I attached a wrong picture.

    Roberto

    #197125

    Nope

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