Chris Moody (pivot band ) Daily

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #131874 quote
    jdicks
    Participant
    Junior
    //Created by ChrisMoody 11/11/2014
    //Current Timeframe, Daily Pivot Bands
    //Special Thanks to Michael S. For Providing Original Code.
    study(title="CM_Pivot Bands V1", shorttitle="CM_PivotBands_V1", overlay=true)
    lengthMA=input(7, title="EMA Length To Calculate Bands")
    sc = input(true, title="Show Current Chart Timeframe Pivot Bands?")
    sd = input(false, title="Show Daily Pivot Bands?")
    
    PP = (high + low + close)/ 3
    PPEMA = ema(PP, lengthMA)
    HP1 = (PP + (PP-low))
    LP1 = (PP - (high-PP))
    HP2 = (PP + 2*(PP-low))
    LP2 = (PP - 2*(high-PP))
    
    // PPD71 = Difference from HP1 and LP1 for the last 7 days
    PPD71 = (((HP1-LP1)+(HP1[1]-LP1[1])+(HP1[2]-LP1[2])+(HP1[3]-LP1[3])+(HP1[4]-LP1[4])+(HP1[5]-LP1[5])+(HP1[6]-LP1[6]))/7)
    // PPD72 = Difference from HP2 and LP2 for the last 7 days
    PPD72 = (((HP2-LP2)+(HP2[1]-LP2[1])+(HP2[2]-LP2[2])+(HP2[3]-LP2[3])+(HP2[4]-LP2[4])+(HP2[5]-LP2[5])+(HP2[6]-LP2 [6]))/7)
    
    r1 = PPEMA + PPD71
    s1 = PPEMA - PPD71
    r2 = PPEMA + PPD72
    s2 = PPEMA - PPD72
    
    plot(sc and PPEMA ? PPEMA : na, title="Current Timeframe Pivot Point ", style=linebr, linewidth=2, color=fuchsia)
    p1=plot(sc and r1 ? r1 : na, title="Current Timeframe R1", style=linebr, linewidth=2, color=#DC143C)
    p2=plot(sc and s1 ? s1 : na, title="Current Timeframe S1", style=linebr, linewidth=2, color=lime)
    p3=plot(sc and r2 ? r2 : na, title="Current Timeframe R2", style=linebr, linewidth=2, color=maroon)
    p4=plot(sc and s2 ? s2 : na, title="Current Timeframe S2", style=linebr, linewidth=2, color=#228B22)
    fill(p1, p3, color=red, transp = 85)
    fill(p2, p4, color=lime, transp = 85)
    
    //Daily Pivot Bands
    d_PPEMA = security(tickerid, 'D', PPEMA)
    d_r1 = security(tickerid, 'D', r1)
    d_s1 = security(tickerid, 'D', s1)
    d_r2 = security(tickerid, 'D', r2)
    d_s2 = security(tickerid, 'D', s2)
    
    plot(sd and d_PPEMA ? d_PPEMA : na, title="Daily Pivot Point ", style=circles, linewidth=2, color=fuchsia)
    p11=plot(sd and d_r1 ? d_r1 : na, title="Daily R1", style=circles, linewidth=2, color=#DC143C)
    p12=plot(sd and d_s1 ? d_s1 : na, title="Daily S1", style=circles, linewidth=2, color=lime)
    p13=plot(sd and d_r2 ? d_r2 : na, title="Daily R2", style=circles, linewidth=2, color=maroon)
    p14=plot(sd and d_s2 ? d_s2 : na, title="Daily S2", style=circles, linewidth=2, color=#228B22)
    fill(p11, p13, color=red, transp = 80)
    fill(p12, p14, color=lime, transp = 80)
    #131879 quote
    Vonasi
    Moderator
    Master

    Welcome to the forums. – but something is missing from your first post like a ‘Hello – could someone please…. thank you’? You post just a code and we are supposed to guess what you want. Being polite costs nothing.

    If it is a free code conversion you want then you should have followed the instructions found under the ‘Help’ menu and also here:

    https://www.prorealcode.com/free-code-conversion/

    Perhaps you should have done a search first and then you would have found this:

    Pivot Bands

    Also when posting code always use the ‘Insert PRT Code’ button even if it isn’t PRT code to separate it from your other text – oh no hang on there wasn’t any other text! I’ll edit your post, 🙂

    #131955 quote
    jdicks
    Participant
    Junior

    Really sorry , it was the first time I have posted, I did write something but guess I wrote it in the wrong place as it is not showing .

    I didn’t mean to come across rude it was a mistake so sorry thanks for the reply.

    Regards

    J

    #131956 quote
    jdicks
    Participant
    Junior

    Thanks

    #131969 quote
    Vonasi
    Moderator
    Master

    Perhaps my reply was a little abrupt but it is 33 degrees Celsius here in Greece and at those temperatures my tolerance of first post rule breaking is perhaps a little tested!

    If you added text but then it mysteriously fails to arrive in your post then you have five minutes to edit your post after you first submit it. So no excuses from now on. 🙂

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

Chris Moody (pivot band ) Daily


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
jdicks @jdicks Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by Vonasi
5 years, 9 months ago.

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