Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. nima021
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
    N
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 6
    • Best 0
    • Groups 0

    nima021

    @nima021

    -1
    Reputation
    2
    Profile views
    6
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    nima021 Unfollow Follow

    Latest posts made by nima021

    • RE: Using ParabolicSAR inside strategy

      @run-out said in Using ParabolicSAR inside strategy:

      int

      Yes I searched and found QuantConnect. this is exactly I said. for live trading you should have orginal PSAR that is float. in pineScript and QuantConnct this is float but in backtrader because of it's own definition. and when its float you can reach more different takeprofit.

      posted in Indicators/Strategies/Analyzers
      N
      nima021
    • RE: Using ParabolicSAR inside strategy

      @run-out thanx, I had red this before but I want to put 0.11 for period but it errored period can not be float.
      but in pine script it can be
      start=0.11
      please read my question completely
      best regards

      posted in Indicators/Strategies/Analyzers
      N
      nima021
    • RE: psar

      @run-out thank you very much dear
      as I read 'start' in pineScript == 'period' in backtrader?
      I had set it on both pine script and backtrader and it worked.
      But my problem is that set value of start pram = 0.11 in my strategy pineScript and I get good result
      but when I wanted to convert it to python:
      set value of period pram must be = 0.11 but when I give the value to period I have eroor:
      TypeError: 'float' object cannot be interpreted as an integer
      but when I give period=2 that works!
      but I have to give period=0.11
      can you help me pls?

      posted in Indicators/Strategies/Analyzers
      N
      nima021
    • RE: Using ParabolicSAR inside strategy

      @nima021 how can put float as integer?

      posted in Indicators/Strategies/Analyzers
      N
      nima021
    • RE: Using ParabolicSAR inside strategy

      @switchfire start in pine can be float but prriod in python can not be float.

      posted in Indicators/Strategies/Analyzers
      N
      nima021
    • psar

      hello
      I am working on strategy and I have problem in converting Parabolic SAR indicator from pineScript to python and using in backtrader.
      in pine the refrence code of calculation is:

      psar = ta.sar(start, increment, maximum)
      start (simple int/float) Start.
      inc (simple int/float) Increment.
      max (simple int/float) Maximum

      but in talib the refrence code are:
      real = SAR(high, low, acceleration=0, maximum=0)

      and in backtrader refrence code Params are:
      bcktrader.ind.PSAR(period, af, afmax)
      period (2)
      af (0.02)
      afmax (0.2)

      i found :
      increment val= af and maximum=afmax but I couldnt find any refrence in what happened for start? my start is 0.11 and its float and can not put start = peroid because period can not be float
      how can I add start value to backtrader strategy?

      posted in Indicators/Strategies/Analyzers
      N
      nima021