PIVOT POINTS AND H/L/C
Forums › ProRealTime English forum › ProBuilder support › PIVOT POINTS AND H/L/C
- This topic has 3 replies, 2 voices, and was last updated 7 years ago by AVT.
-
-
08/07/2017 at 8:46 AM #42630
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
08/07/2017 at 10:20 PM #42717You mean something like this?
print users given values123456789101112131415161718192021222324252627282930313233343536373839// === 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=0IF NOT HideAll THEN// --- R3-R1 redDRAWSEGMENT(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 grayDRAWSEGMENT(barindex-1,DPiv,barindex,DPiv) coloured(128,128,128)// --- S1-S3 greenDRAWSEGMENT(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 blueDRAWSEGMENT(barindex-1,Hi,barindex,Hi) coloured(98,184,255) //lightDRAWSEGMENT(barindex-1,Lo,barindex,Lo) coloured(65,105,225) //dark// --- O C cyanDRAWSEGMENT(barindex-1,Op,barindex,Op) coloured(0,255,255) //lightDRAWSEGMENT(barindex-1,Cl,barindex,Cl) coloured(0,205,205) //darkENDIFRETURNFor quick adding make the values extern.
08/08/2017 at 9:53 AM #42737thanks 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…
08/08/2017 at 1:45 PM #42753Yes, 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 users values with line adjustments12345678910111213141516171819// === 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=12050RETURN 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.
-
AuthorPosts
Find exclusive trading pro-tools on