Help with code for this swing trade setup

Forums ProRealTime English forum ProScreener support Help with code for this swing trade setup

Viewing 14 posts - 1 through 14 (of 14 total)
  • #17303

    Hello all,

    I am new to Prorealtime coding, I would like to ask if you can help me code the setup in the attached picture. Basically, there are 3 steps in this

    1. Locate 3-3 Pivot High Day (Point A in the picture)
    2. Count 5 or more consecutive closes below a 5-day simple moving average
    3. Signal if closing price of any following day break above the 5 period SMA

    Appreciate you reading this post and help respond to this thread.

    Thank you

    HH

    #17348

    Before trying to code it, could you please tell us where did you find this pattern setup and if you are using it yourself in some way? thank you.

    So you want to have a signal indicator? or maybe a screener for this pattern?

    #17369

    Thank you for your repose. The site where I cited that image is here

    Will you please make both a screener and signal indicator for this pattern?

    Thanks – CEO76

    #17374

    Ok that’s fine, I coded the indicator, you’ll find it attached to this email. I haven’t read the entire website description you give me, but it seems already effective, but I believe it should be tested in a already formed bullish trend to give better rebound (IMO).

    If you are ok with the signals given, I’ll post the stock screener code too.

    [edit] have change the code a bit : no signals if the actual close is superior to the pivot, no signals if a signal has already fired with the same pivot point.

    #17468

    Nicolas, thanks for your great code (quite a nice math algorithm behind that code too) . I would like to ask if you can add the following

    1. Create Indicator for short strategy and flag signals only when the current leg is around Fibonacci levels such as 0.5,  0.618, 0.76, 1.27, 1.41, 1.68, etc and other conditions in the setting are met.
    2. Modify indicator for long strategy with fag signal similar to the short setup
    3. Last but not least, please make the above as screener too.

    Millions thanks

    CEO76

    #17470

    1/ why not, but how do you calculate these Fibonacci levels? for a long setup: between the last high pivot and the lowest price met?

    2/ if the above 1 is ok, of course I will.

    3/ when the 2/ will be ok!

    #17473

    Nicolas, Last highest and lowest Pivot point should be reasonable to calculate the Fib extension or entrancement.

    I am also wondering if RSI can be used to determine highest and lowest point for Fib calculation for example lowest RSI would represent Lowest point, and Highest point will be the highest RSI. What do you think?

    Please help with the indicators and screener if you can.

    Thanks

    CEO76

    #17475

    For a long setup (like in the already made indicator), there is no low pivot points, only highest one, accordingly to your original description.

    Code is strict and I definitely need what price levels to use for 0 and 100% Fibonacci levels. We already have the last high pivot point (100%), now we need to define what is the 0% .. that’s why I told you about the lowest price met. About RSI, I don’t think that is a good choice 🙂 , we should focus on price here, not about indicator derived from it.

    #17476

    Now I see your point. Please code it with the lowest price meet and hope you can have some Fib label print at the intersection point. 

    Look forward to hearing from you.

     

    #17483

    By “interception point”, you mean the condition ‘C’ of your first screenshot?

    #17484

    yes it’s

    If it’s not possible to add a label there don’t worry.

    #34716

    was the final code uploaded ??

    #34731

    I agree user10 736  … this looks interesting, I must have missed it first time round.

    I’ll run the code above (Nicolas kindly provided) in the morning.

     

    #34747

    Hmmm, must refresh my memory about this topic … too much time has passed.

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

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