triple ROC calculation is wrong

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #137630 quote
    Patrick K Templar
    Participant
    Average

    There’s a small mistake in the code I obviously don’t know what it is thank you

    a=ROC[5](close)
    b=ROC[15](close)
    c=ROC[25](close)
    d=ROC[15](close)
    e=ROC[25](close)
    f=ROC[39](close)
    rem calculation of the TRIPLE ROC
    g=(a+b+c)*100 next i=(d+e+f)*100
    
     
    
    myroc =  (g)
    myroc1 =  (i)
    
    return myroc as "TRO", myroc1 as "TRT"
    #137633 quote
    robertogozzi
    Moderator
    Master

    Replace lines 8 and 9 with:

    g=(a+b+c)*100
    i=(d+e+f)*100

    NEXT is a keywords reserved for loops. Can’t figure out why it’s been used like that.

    #137636 quote
    Patrick K Templar
    Participant
    Average
    
    a=ROC[5](close)
    b=ROC[15](close)
    c=ROC[25](close)
    d=ROC[15](close)
    e=ROC[25](close)
    f=ROC[39](close)
    rem calculation of the TRIPLE ROC
    g=(a+b+c)*100 
    i=(d+e+f)*100
     
     
     
    myroc =  (g)
    myroc1 =  (i)
     
    return myroc as "TRO", myroc1 as "TRT"
    #137637 quote
    Patrick K Templar
    Participant
    Average

    It’s me I don’t know what I’m doing even when I take that away it’s still not working

    Could you check it all out for me again please and see what else is wrong

    #137649 quote
    Nicolas
    Keymaster
    Master

    There is nothing wrong in your last code, what is not working please?

    Please next time use a more meaningful topic title! I will change it for you..

    #137663 quote
    Patrick K Templar
    Participant
    Average

    It is working now you are right
    I will try and make the titles more meaningful and future thank you

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

triple ROC calculation is wrong


ProBuilder: Indicators & Custom Tools

New Reply
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by Patrick K Templar
5 years, 7 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 06/30/2020
Status: Active
Attachments: No files
Logo Logo
Loading...