Coding the Chandelier Exit

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #91517 quote
    martianmartian
    Participant
    New

    I need to implement the Candelier Exit in my trading strategy in PRT, but fail to understand how to code it. The rules are quite simple:

    If Long entry:

    1. Set Current Exit to entry price – Factor x Average True Range (of period x)
    2. Store the intitial risk R as Factor x Average True Range (of period x)

     

    When Long, update exit:

    1. New Exit= Highest high since entry – Factor x Average True Range (of period x)
    2. If New Exit>Current Exit then Current Exit=New Exit

     

    When Long, exit next bar (day) if

    1. Close<Current Exit
    2. Close-Entry Price >=4 * R

     

    If Short entry:

    1. Set Current Exit to entry price + Factor x Average True Range (of period x)
    2. Store the intitial risk R as Factor x Average True Range (of period x)

     

    When Short, update exit:

    1. New Exit= Lowest low since entry + Factor x Average True Range (of period x)
    2. If New Exit<Current Exit then Current Exit=New Exit

     

    When Short, exit next bar (day) if:

    1. Close>Current Exit
    2. Entry Price – Close >=4 * R

    I’d appreciate any thoughts about this.

    #91518 quote
    martianmartian
    Participant
    New

    The exit should also be possible to narrow by reducing the factor for each achieved profit measured in terms of R. For example, starting with a Factor of 3, a profit of 2R could decrease the Factor to 2.5, a profit of 3R could decrease the Factor  to 2.0.

    #128326 quote
    NicolasNicolas
    Keymaster
    Legend

    The chandelier exit code can be found in this topic: ATR TRAILING STOP

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Coding the Chandelier Exit


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
martian @martian Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by NicolasNicolas
6 years, 5 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 02/16/2019
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...