Same strat different Indicators

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #164936 quote
    Anouar
    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
    robertogozzi
    Moderator
    Master

    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
    Anouar
    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.

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 Anouar
4 years, 10 months ago.

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