Repulse .. Code needed

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #65711 quote
    JohnScher
    Participant
    Veteran

    Hello again.

    As some may know, I like to work with the Repulse indicator as a stop.

    In PRT, the Repulse is preset as an indicator.
    But how can the code be code? I didn’t find anything.
    PRT gives me only this, see screenshot.

    Kind regards
    JohnScher

    #65724 quote
    Nicolas
    Keymaster
    Master

    Are you talking about this one?

    ////////////////////	repulse
    
    a = 100 * ( 3 * CLOSE - 2 * LOW - OPEN ) / CLOSE
    b = 100 * ( OPEN + 2 * HIGH - 3 * CLOSE ) / CLOSE
    
    
    d = EXPONENTIALAVERAGE[P1](a) - EXPONENTIALAVERAGE[P1](b)
    
    
    
    
    RETURN d as "repulse",0 as "zero"
    JohnScher thanked this post
    #65746 quote
    JohnScher
    Participant
    Veteran

    Hello, Nicolas.

    Very nice! Thank you very much!

    That’s what I’ve been looking for.
    Compare the ScreenShot. Above the default indicator of PRT below your indicator. There fits!

    Can you still put in the rejecting moving average?

    Child regards
    JohnScher

    #71433 quote
    JohnScher
    Participant
    Veteran

    Hello, Nicolas.

    Very nice! Thank you very much! That’s what I’ve been looking for.

    I would like to examine the reaction of the Repulse in relation to the rejecting average. My programming skills are very limited, so I wanted to ask you if you could integrate me the code into for the rejecting average? the red line in the screenshot.

    Kind regards
    JohnScher

    #71478 quote
    Nicolas
    Keymaster
    Master

    You should make the comparison yourself, about the type of average and its period, cause I don’t know what are the originals one:

    ////////////////////	repulse
    
    a = 100 * ( 3 * CLOSE - 2 * LOW - OPEN ) / CLOSE
    b = 100 * ( OPEN + 2 * HIGH - 3 * CLOSE ) / CLOSE
    
    
    d = EXPONENTIALAVERAGE[P1](a) - EXPONENTIALAVERAGE[P1](b)
    
    avg = average[30,1](d)
    
    RETURN d as "repulse",0 as "zero", avg

    You can change the 2 settings in brackets: [30,1] , first is the period of the moving average, second one is the type of moving average.

    JohnScher thanked this post
    #72768 quote
    JohnScher
    Participant
    Veteran

    Hello, Nicolas.

    Thank you very much, really. I’ve been putting in the rejectiv average. That works out so far.
    Thank you again very much.

    until then
    JohnScher

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

Repulse .. Code needed


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
JohnScher @johnscher Participant
Summary

This topic contains 5 replies,
has 2 voices, and was last updated by JohnScher
7 years, 8 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 03/19/2018
Status: Active
Attachments: 3 files
Logo Logo
Loading...