Backtrader Community

    • 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/

    Trailing stop

    Indicators/Strategies/Analyzers
    1
    1
    162
    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.
    • Y
      Youssef 0 last edited by

      Hi,

      Can one set a trailing stop which is neither a constant nor a percentage ?

      What i want to do is set a trailing stop which is the standard deviation of the price calculated on the last 20 days for example. I want this trailing stop to be updated for each new bar. Example :

      Trailing stop for bar 20 is the standard deviation of the price for bar 1 to 20.
      Trailing stop for bar 21 is the standard deviation of the price for bar 2 to 21.
      ETC....

      Is it possible ?

      Thank you

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