Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

    Creating a strategy based on Supports and Resistances and plotting said lines

    General Discussion
    3
    5
    849
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      Tirtharaj last edited by

      Hello, I'm new to Backtrader and I want to achieve the following.
      I want to create a trading strategy based on Support and Resistance lines and price action but for now, my goal is to calculate and visualize said support and resistance lines for a stock. So my questions are :

      1. What is the best practice here in order to detect and plot support and resistance lines? The practice of using supports and resistances seems to be common so I'm guessing there must be widely accepted measures to do it.

      2. It's likely that supports and resistances don't have a standard approach because it is rather subjective. In that case I'd like to use the trendln package in order to calculate these lines.
        link: https://pypi.org/project/trendln/

      3. I've come across a pinescript indicator which finds horizontal supports and resistances to my liking. I require help in converting that to an indicator in backtrader.
        link:https://www.tradingview.com/script/va09eWAp-Support-Resistance-Dynamic-v2/

      Thank you everyone in advance, if I'm asking these questions on the wrong forum, please direct me to the correct one.

      C 1 Reply Last reply Reply Quote 0
      • C
        crazy25000 @Tirtharaj last edited by

        @tirtharaj backtrader has at least 3 built in, here's an example https://backtrader.com/docu/indautoref/#pivotpoint

        Plotting is also supported https://backtrader.com/blog/posts/2016-04-28-pivot-point-cross-plotting/pivotpoint-crossplotting/

        The documentation and articles section are well detailed. Recommend reading them at least once to learn what's available.

        1 Reply Last reply Reply Quote 1
        • C
          crazy25000 last edited by

          If the built in ones don't meet your needs, recommend reading the indicator development section. It's in the same area in the first link above.

          T 1 Reply Last reply Reply Quote 1
          • T
            Tirtharaj @crazy25000 last edited by

            @crazy25000 i'll look into it thanks

            I 1 Reply Last reply Reply Quote 0
            • I
              ilikerolls @Tirtharaj last edited by

              @tirtharaj Did you ever have any luck with this? I am looking for the same thing. I would appreciate anything you could share.

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors