Swing Lines strategy

Forums ProRealTime English forum ProOrder support Swing Lines strategy

Tagged: 

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

    Hi @Rorshack,

    Thanks a lot for this piece of code; really useful; https://www.prorealcode.com/topic/swing-lines-indicator/

    I am looking to translate this indicator into a strategy which was surely your purpose;

    di you already code it and if yes would you share it?

    Very best,

    Chris

    #87106

    Since you want to talk about a strategy I moved your post to ProOrder and inserted a link to the indicator, in your post.

    Please use the correct forum when posting. Thank you.

    1 user thanked author for this post.
    #87281

    Do you have ideas on how to use the indicator as a strategy? If you could define it precisely, then someone could be able to program it.

    Dozens of strategies could be made from a single line on a chart, so take time to have a precise idea and post a full description (and with screenshots if you find them necessary for a better comprehension).

    1 user thanked author for this post.
    #87303

    Hi,

    I was asking directly @rorshack if he had written whatever stategy on this ;

    I am thinking of a combination of strategies that would

    • test if the close breaks out the support/ resistance
    • verify if the break out is confirmed
    • target the next supports/resistance depending on the importance of the level of volume based on volume per price
    • set in consequence targets for profit
    • adjust with fibonacci test

    If anyone had a skeletton, I would appreciate !

    Best,

    Chris

    #87308

    Unfortunately I haven’t written any strategy based on this indicator because the pro real time API does not allow me to. This indicator itself is very slow and the code is a bit heavy. I abandoned pro real time coding because of this. To write a strategy based on this indicator I needed to deal with arrays but it cannot be done.

    Sorry guys!

    #87313

    Hi @rorschack,

    So you think I cannot code the strategy I imagine above with PRT?

    So on which platform did you move ?

    Thanks,

    #87319

    Well, my intentions were to write a very simple strategy, no Fibonacci  and without any other indicator but I was not able to do it because of the PRT API. That happened almost one year ago. Honestly I don’t know if something changed in PRT since then. I don’t know if it’s possible to code your strategy now. I remember that PRT was evolving so maybe it is possible. I’m sure that @Nicolas can tell us something more.

    1 user thanked author for this post.
    #87341

    Thank you @Rorschack for the update.

    Without arrays, I made this version: https://www.prorealcode.com/topic/swing-lines-indicator/#post-34383 that store the last 10 support lines. I’m almost sure I coded the complete one with resistance too, it must be somewhere in the forum..

    1 user thanked author for this post.
    #87581

    Hi Nicolas,

    It is here and thank you for this piece of code;

    https://www.prorealcode.com/prorealtime-indicators/dynamic-support-resistance-intraday/

    I am really trying to code this strategy from above (https://www.prorealcode.com/topic/swing-lines-strategy/#post-87303) but I struggle to understand the subtilities of the code i.e

    • I don’t get though why the variables “lastsupport” and “lastresistance” are lagging while the hereunder variables are not
    • what is the use of this indicator

    and why should we devide the former resistance by 2 if

    • what should I change to use for a swing trading on a 4hours basis considering maxbars => only shifting maxbars to barindex ?

    Thanks a lot for your help as even the great courses your created on coding did not enlighten this great piece of code;-)

    Best,

    Chris

    #88131

    Hi Nicolas,

    Complementary to the hereunder question and in my willing to understand what you did i.e emprove my coding knwoledge, I don’t get why the variable “linear” gets this number (enclosed) as

    • it has been given the value => 0
    • the fomula writes linear = (resistance [1] + linear ) / 2

    Sorry to bother you with this but I think it is important for me to understand this subtility;

    I hope you agree 😉

    Very best

    Chris

    #88150

    The code is not mine, and I was just like you when I tried to catch all of the aspect of it at that time I modified it.

    linear variable stands for resistance lines and lineas for support lines.

    The code you mentioned is used to wait that the resistance or support lines have been confirmed (high high or lowest not changed since n bars). Divided the value by 2 is useful to make the code wait for the conditions to test if linear or lineas has not changed since 2 periods (at line 134 for instance).

    Then when linear and lineas have changed, the code is making a test about the tolerance above and below it over a dynamic loop made of “maxbars” which is the intradaybarindex quantity. If the tolerance test is ok, an average of the found support and resistance lines is made and the line will be plot later in the code.

     

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