Is it possibile to get a system to optimize itself each x?

Viewing 2 posts - 16 through 17 (of 17 total)
  • Author
    Posts
  • #6272 quote
    NicolasNicolas
    Keymaster
    Legend

    Well, I found something more relevant for the formula :

    Current ATR = [(Prior ATR x 13) + Current TR] / 14
    
      - Multiply the previous 14-day ATR by 13.
      - Add the most recent day's TR value.
      - Divide the total by 14

    So here is the ATR formula to compute the Daily timeframe to be used in any other timeframe.

    period = 14
    
    //True range calculation
    d1 = Dhigh(0)-Dlow(0)
    d2 = abs(Dhigh(0)-Dclose(1))
    d3 = abs(Dlow(0)-Dclose(1))
    
    dailyTR =max(d1,max(d2,d3))
    
    c = exponentialaverage[period](dailyTR)
    
    RETURN c as "Daily Timeframe ATR"

    Which return the good result in daily timeframe, same as the embedded ATR of the platform (look at picture attached). But a slightly different one when in inferior timeframe. Don’t know really why for the moment..

    average-true-range-on-a-daily-timeframe.png average-true-range-on-a-daily-timeframe.png
    #6274 quote
    RobinRobin
    Participant
    Veteran

    Thanks Nicolas, thats great šŸ™‚

Viewing 2 posts - 16 through 17 (of 17 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

Is it possibile to get a system to optimize itself each x?


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
simon_json @simon_json Participant
Summary

This topic contains 16 replies,
has 4 voices, and was last updated by RobinRobin
10 years, 6 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 04/18/2016
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...