Help with code for this swing trade setup

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #17303 quote
    CEO76
    Participant
    New

    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

    PVdaySetup.jpg PVdaySetup.jpg
    #17348 quote
    Nicolas
    Keymaster
    Master

    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 quote
    CEO76
    Participant
    New

    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 quote
    Nicolas
    Keymaster
    Master

    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.

    swing-trade-setup-indicator.png swing-trade-setup-indicator.png PRC_SwingTrade-pivot-signals.itf
    #17468 quote
    CEO76
    Participant
    New

    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 quote
    Nicolas
    Keymaster
    Master

    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 quote
    CEO76
    Participant
    New

    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 quote
    Nicolas
    Keymaster
    Master

    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 quote
    CEO76
    Participant
    New

    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 quote
    Nicolas
    Keymaster
    Master
    By “interception point”, you mean the condition ‘C’ of your first screenshot?
    #17484 quote
    CEO76
    Participant
    New
    yes it’s If it’s not possible to add a label there don’t worry.
    #34716 quote
    user10 736
    Participant
    New
    was the final code uploaded ??
    #34731 quote
    GraHal
    Participant
    Master
    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 quote
    Nicolas
    Keymaster
    Master
    Hmmm, must refresh my memory about this topic … too much time has passed.
Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.

Help with code for this swing trade setup


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
CEO76 @ceo76 Participant
Summary

This topic contains 13 replies,
has 4 voices, and was last updated by Nicolas
8 years, 10 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 11/27/2016
Status: Active
Attachments: 3 files
Logo Logo
Loading...