PIVOT POINTS AND H/L/C

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #42630 quote
    Mr Mackey
    Participant
    Junior

    Hello all…

    I want to be able to manually input the values of daily pivot points and OHLC on my price charts.  I dont want to have a robot working them out (this is because I am using PRT through IG and their prices are indicative of the real price) so I will be getting my values from an outside source eg investing.com.

    The way I can see this happening is each time I want to update the values, I click on the spanner, then click on the indicator, then on the right panel/settings I enter the values for:

    R3/R2/R1/DP/S1/S2/S3/O/H/L/C

    Then the indicator would simply add the lines on my price chart.  There are no parameters needed for the lines, they can go back 20 years if needed as my strategy needs to identify zones…but I dont want the lines going further than the day I am trading from.   (I would make each line appear different to my choosing then make is a default configuration)

    Can anyone help? (if this has already been programmed then could someone point the way, I cant seem to find anything that helps me)

    Thank you

    #42717 quote
    AVT
    Participant
    Senior

    You mean something like this?

    // === print value which are manually given by user
    
    // --- extern:
    // --- pivot data
    //Res3=12500
    //Res2=12400
    //Res1=12300
    //DPiv=12200
    //Sup1=12100
    //Sup2=12000
    //Sup3=11900
    //// --- open,high,low,close
    //Op=12250
    //Cl=12110
    //Hi=12340
    //Lo=12050
    // --- for quick turn on/off lines
    //HideAll=0
    
    IF NOT HideAll THEN
    // --- R3-R1 red
    DRAWSEGMENT(barindex-1,Res3,barindex,Res3) coloured(255,0,0)
    DRAWSEGMENT(barindex-1,Res2,barindex,Res2) coloured(255,128,128)
    DRAWSEGMENT(barindex-1,Res1,barindex,Res1) coloured(255,192,192)
    // --- Piv dark gray
    DRAWSEGMENT(barindex-1,DPiv,barindex,DPiv) coloured(128,128,128)
    // --- S1-S3 green
    DRAWSEGMENT(barindex-1,Sup3,barindex,Sup3) coloured(0,128,0)
    DRAWSEGMENT(barindex-1,Sup2,barindex,Sup2) coloured(0,192,0)
    DRAWSEGMENT(barindex-1,Sup1,barindex,Sup1) coloured(0,255,0)
    // --- H L blue
    DRAWSEGMENT(barindex-1,Hi,barindex,Hi) coloured(98,184,255) //light
    DRAWSEGMENT(barindex-1,Lo,barindex,Lo) coloured(65,105,225)  //dark
    // --- O C cyan
    DRAWSEGMENT(barindex-1,Op,barindex,Op) coloured(0,255,255) //light
    DRAWSEGMENT(barindex-1,Cl,barindex,Cl) coloured(0,205,205) //dark
    ENDIF
    
    RETURN
    

    For quick adding make the values extern.

    #42737 quote
    Mr Mackey
    Participant
    Junior

    thanks AVT, this will certainly get me started….

    So with this code I will have to click modify indicator every time I wish to update the values? do we know how to get this to work like an indicator that I can adjust on the right side by entering values line width style etc…

    Is there a library for getting the colours, line styles etc so I can set what you kindly have done to my customisation? (saves you or someone else doing it and for me to learn!!!!)

    eg (just like PRT pivot points) Res all green but different styles and thickness… Sup all red etc etc etc…

    #42753 quote
    AVT
    Participant
    Senior

    Yes, of course we can simply use RETURN variablename AS “Human Name in Indicator Adjustment”, the only disadvantage (for me personally) is that I cannot switch on/off all the lines with a single “check box” because an indicators last command must be a RETURN command of some kind. So I cannot do something like

    IF NOT HideAll THEN

    RETURN varname as “Human Name”

    ENDIF

    because here we have ENDIF as the very last thing and that’s not possible. So if you want to adjust the lines as for example in the normal Pivot Indicator you must set each line separately to “not shown” if you need a clean chart without all the lines. But here we go with the code:

    // === print value which are manually given by user
    
    // --- extern:
    // --- pivot data
    //Res3=12500
    //Res2=12400
    //Res1=12300
    //DPiv=12200
    //Sup1=12100
    //Sup2=12000
    //Sup3=11900
    //// --- open,high,low,close
    //Op=12250
    //Cl=12110
    //Hi=12340
    //Lo=12050
    
    
    RETURN Res3 as "R3", Res2 as "R2", Res1 as "R1", DPiv as "Piv", Sup1 as "S1", Sup2 as "S2", Sup3 as "S3", Op as "O", Hi as "H", Lo as "L", Cl as "C"
    

    Now for doks:

    A pdf for download can be found here:

    https://www.prorealtime.com/en/help-manual/probuilder-custom-indicators

    our online dok for quick reference is here:

    https://www.prorealcode.com/prorealtime-documentation/

    Nicolas basic programming course (french) is here:

    https://www.prorealcode.com/courses/premiers-pas-avec-la-programmation-pour-prorealtime/

    and some videos (french but also some in english) are here:

    https://www.youtube.com/channel/UC8bNosI3wuid_3Ze7CzorvA/videos

    Hope that will help you for the beginning.

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

PIVOT POINTS AND H/L/C


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Mr Mackey @mr-mackey Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 08/07/2017
Status: Active
Attachments: No files
Logo Logo
Loading...