Swing lines indicator

Forums ProRealTime English forum ProBuilder support Swing lines indicator

Viewing 10 posts - 16 through 25 (of 25 total)
  • #35333

    if you only want to search through the last 5 days in a 30 minutes, you need to count how much 30 minutes bars there are in 5 days: (24 hours * 2 bars * 5 days) = 240 bars  and change the first line to only fetch through this bar quantity:

     

     

    #36175

    Hi Nicholas,

    Can you build an indicator to draw these swing lines?
    Best Regards
    Gabriele
    #36179

    @invento

    From Ninjatrader? If you have the source code, it should be possible to be converted. Please open a specific thread in the ProBuilder section, thank you.

    #36401

    Hi @Nicolas,

    Yes it is Ninjatrader, but i don’t have source code,  Ninjatrader has an internal function .SwingHigh and .SwingLow that I do not think Prorealtime have on.

    I’ve read that you’ve started doing something like that in the discussion:

    https://www.prorealcode.com/topic/punti-di-swing-statici/

    but I thought that with the new design tools of version 10.3 you could draw segments and not horizontal lines.

    Regards

    Gabriele

    #36480

    Well, maybe you could explain what the indicator do so I could try to recode it from scratch.

    #37335

    Thanks Rorschack & Nicolas

    Anyway to make the levels not originate or start at zero so that you don’t have to adjust the price axis scaling when changing timeframes?

    Thanks

    Copperwave

    #92305

    Hello,

    I reuse the original code, but used the William’s 3 bar indicator in order to identify the high/low acting as support/resistance in order to filter out the number of lines drawn. The outcome is better than the original version in my opinion, at least for daily/weekly charts on stock (what I was focus on). Code can still be optimized though, I’m not a pro coder.

     

     

    1 user thanked author for this post.
    #92312

    Sorry, you have to add the term “tolerance” as parameter for the indicator, or add it at the beginning of the code. It is express here in percentage, and not in point. Depending on the TF, you can use like 0.2 (for intraday) to 3 for weekly

    1 user thanked author for this post.
    #92333

    Thank you stefou! While playing with the tolerance, it seems that it does not change anything in the detection of the supports and resistances, I did not deepen the understanding of your version however 😳

    #92345

    Normally, if two lines acting as support are resistance are too close (by the definition of the tolerance), one of them disappear. In the code before, I think you took the average of the two, but I prefer keeping the highest/lowest of the two depending on the case. But indeed, I have noticed that in a few cases, it doesn’t work as intended. So there are still a few bugs in the code, but overall work very well (for me at least). I hope someone can still improve it.

Viewing 10 posts - 16 through 25 (of 25 total)

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