Dashboard return current value
Forums › ProRealTime English forum › ProBuilder support › Dashboard return current value
- This topic has 7 replies, 3 voices, and was last updated 2 years ago by Jocke.
-
-
03/29/2021 at 9:56 AM #165606
Dear Probuilder support
I am building a dashboard/indicator following your tips and instructions found on the forum.
This link is very helpful for the drawtext function of an indicator (https://www.prorealcode.com/blog/learning/simple-indicators-dashboard/)
But I cant find out how to return the current value of a indicator.
I am trying to get the current ATR value/number displayed in realtime or the bollinger band width for example.
Best regards
03/29/2021 at 10:31 AM #165610There you go:
12MyATR = AverageTrueRange[14](close)DrawText("#MyATR#",BarIndex,high * 1.005)You have to embed the variable name within hashes.
1 user thanked author for this post.
03/31/2021 at 7:28 AM #16578306/19/2021 at 4:50 AM #172020Hi Roberto,
is there a way to return (via drawtext) the value of an indicator at every 1 minute interval in a 15 minute time frame. For example using drawonlastbaronly=true this would result in printing value of indicator every 1 minute for total of 15 results on every bar.
if possible, I would appreciate your help on how to achieve this.
Regards,
06/19/2021 at 8:08 AM #172021No, it’s not possible.
Multi Time Frame support allows to plot higher TF’s indicators and values in a smaller TF, not the other way round.
It’s because the lowest TF used is the one that sets the pace (timing) and it must be the one of your chart.
12/29/2021 at 12:14 PM #184089Dear Roberto
A short follow up/ addition to the returned values.
I try to code them in different colours like if ATR is above value of 20 it is displayed in green text and below 20 in red for example.
What is wrong with the code below?
//—ATR
myATR = AverageTrueRange[14](close)
DRAWTEXT(“ATR:”,barindex-Xoffset,65,SansSerif,Bold,16)coloured(230,230,250)
if myATR>20 then
DRAWTEXT(“#MyATR#”,barindex–25,65,SansSerif,Bold,16)coloured(0,153,0)
elsif myATR<20 then
DRAWTEXT(“#MyATR#”,barindex–25,65,SansSerif,Bold,16)coloured(153,0,0)
endifThank you and best regards.
12/29/2021 at 6:52 PM #184129There you go:
12345678910111213//—ATRDEFPARAM DrawOnLastBarOnly = TRUEXoffset = 10myATR = AverageTrueRange[14](close)Distance = myATR * 0.3if myATR>90 thenDRAWTEXT("ATR:",barindex-Xoffset,myATR+Distance,SansSerif,Bold,16) coloured(230,230,250)DRAWTEXT("#myATR#",barindex,myATR+Distance,SansSerif,Bold,16) coloured(0,153,0)elsif myATR<=90 thenDRAWTEXT("ATR:",barindex-Xoffset,myATR-Distance,SansSerif,Bold,16) coloured(230,230,250)DRAWTEXT("#myATR#",barindex,myATR-Distance,SansSerif,Bold,16) coloured(153,0,0)endifreturn myATR AS "ATR"The value 90 (or anything else( must be set according to the time frame (the higher the TF, the higher the value).
1 user thanked author for this post.
01/23/2022 at 11:22 AM #186348 -
AuthorPosts
Find exclusive trading pro-tools on