Same strat different Indicators

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

    Hi guys,

     

    For some reason this code provides two different indicators (Indicator21 , Indicator22)

    CountingIndicator1= call "CountingIndicator1" // provide length of a window.
    
    Indicator21=historicvolatility[CountingIndicator1](LinearRegression[CountingIndicator1](close))
    
    lrclose = LinearRegression[CountingIndicator1](close)
    Indicator22=historicvolatility[CountingIndicator1](lrclose )
    
    return Indicator21 as "Indicator21",  Indicator22 as "Indicator22"

    Any idea why Indicator21 is different from indicator22 please?

     

    Many thanks

    Anouar

    #164943 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    I tested this and they are always the same, no matter  the number of periods:

    CountingIndicator1= 70
     
    Indicator21=historicvolatility[CountingIndicator1](LinearRegression[CountingIndicator1](close))
     
    lrclose = LinearRegression[CountingIndicator1](close)
    Indicator22=historicvolatility[CountingIndicator1](lrclose )
     
    return Indicator21 as "Indicator21",  Indicator22 as "Indicator22"
    #165002 quote
    AnouarAnouar
    Participant
    New

    If number of periods is an indicator as well, For some reason they are not the same (I think its a bug or something related to the behavior of CountingIndicator1 ).

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

Same strat different Indicators


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 03/22/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...