Swing lines indicator

Forums ProRealTime English forum ProBuilder support Swing lines indicator

This topic contains 24 replies, has 10 voices, and was last updated by avatar stefou102 3 months, 3 weeks ago.

View all attachments
Viewing 15 posts - 1 through 15 (of 25 total)
  • #21128

    Hello to everyone,

    before I start, I want to tell everyone that some days ago I wrote this post in the italian forum, in which I was looking for some help because I’ve created an indicator that draws these swing lines that represent  resistances and supports and I wanted to improve the algorithm. Nicolas, helped me to make the indicator work for all assets ( I think you all know him ) and he told me that maybe I can find some more help here.

    So I wanted to create an indicator that can draw the swing lines that I draw manually (first screenshot).

    I wrote the code below:

    The indicator draws the lines like in the second attachment. Now the result is not bad but I would like the reduce the number of the lines. What I would like to do next is to filter the lines using other lines drawn on bigger time frames. Because I’m not that much of an expert with PRT code the algorithm is bit heavy and if I would like to apply the forth filter ( the one based on bigger tf ) I’m afraid it would be much much heavier.

    I already know Nicolas has some ideas and I’m looking forward to see what he has in mind 🙂


    6 users thanked author for this post.

    Thanks to the new website search engine, I retrieved this post lost months ago 🙂

    Here is the version I made so far (same as the one from the Italian forum)

    I’ll try to make further development on this indicator in the next days/weeks. Subscribe! Thanks to Rorschack for the original code and idea!

    1 user thanked author for this post.

    Hi Nicolas, tried your code but it says error in line 1, im using ProRealTime 10.2 (Binck bank version). how can i solve to see support and resistance? Thanks!!


    Sorry but this indicator use graphical components only available since version 10.3.

    You should open a demo account with PRT-CFD! https://www.prorealcode.com/PRT-CFD-english/

    1 user thanked author for this post.

    ok thanks, il try it and let you know 🙂


    Very Nice.

    Exactly what I was looking for if only we can store these values in variables.


    This i great! thx


    perfect. This indicator is Awesome!


    Hi Nicholas,

    as PRT do not support array, Do you have a better way to maintain these R/S level as part of automatic trading system?

    For e.g, Past 10 Rresistance, Past 10 Support

    I would like to use those R/S as exit level.

    Br, CKW


    You can use this updated code I just made, but only for support lines. Even if we don’t have arrays, it stores and draws last 10 support lines (which become resistance line of course when price is below them). Example attached too.

    1. PRC_Dynamic-SR-with-externVars.itf
    1 user thanked author for this post.

    Hey this is great, very useful!

    Thank you so Much Nicolas … I don’t know how you do it and keep up with everything else!



    I don’t know how you do it and keep up with everything else!

    This is something I don’t know myself, and you don’t even have any ideas of how many things are currently on the table ..


    Thanks Nicholas!

    I have the similar way:

    i do not understand very well the Algorithm, how do i adjust the parameters optimize for past friday R / S for 30m time frame?

    1 day = 48 candles (30m)


    Sorry CKW, but I don’t understand? What is the code you provided?


    ah… Sorry Nicholas. It’s 2 different topics
    First part of my post is to share i am using following to back up the Past 10 support. Whenever there is a new support, it will be stored as Y1, previous support will back up as Y2 and so on.

    Second part of my Post is to get your advice, what is the parameters to adjust (n, lookback, etc) if i need only last 5 days R / S  in 30m time frame chart. I do not understand well part of this algorithm.

    Br, CKW

Viewing 15 posts - 1 through 15 (of 25 total)

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