I’m looking for an indicator that draws a vertical line at a specific time on my charts so i don’t have to put them on manually each day. I’m also looking for a coder to build an indicator for me
Hey please post your indicator query, I’m sure me or someone else could do it.
AVTParticipant
Senior
Example for your vertical line, this one draws at 9:00 a red line:
// --- variables
// --- extern
//Time1=090000 // when, must be format hhmmss
//Red=255 // red part of the RGB color code
//Green=0 // green part
//Blue=0 // blue part
//Visability=255 // alpha value of color 0=invisible 255=fully visible
// check color values do not exeede allowed values
Red=max(Red,0) // take the highest between users choice and 0
Red=min(Red,255) // take the lowest between users choice and 255
Green=max(Green,0)
Green=min(Green,255)
Blue=max(Blue,0) // if user pushes -2 -> take 0 which is higher than -2
Blue=min(Blue,255) // if user pushes 400 -> take 255 which is lower than 400
Visability=max(Visability,0)
Visability=min(Visability,255)
IF time=Time1 THEN // if the time is the one of Time1
// syntax: DRAWVLINE(x-AxisValue) coloured(R,G,B,A)
// x-AxisValue: barindex at that candle, barindex-1 one candle before
// optional addition coloured() with RGB and optinal Alpha values
// https://www.prorealcode.com/documentation/drawvline/
// https://www.prorealcode.com/documentation/coloured/
DRAWVLINE(barindex) coloured(Red,Green,Blue,Visability)
ENDIF
// --- each indicator must end with some kind of RETURN (but only ONE Return command is allowe)
// either you plot a line with RETURN VariableName as "a human understandable description"
// or standalone if you used only DRAW... components
// https://www.prorealcode.com/documentation/return/
RETURN
I attach the indicator file, so you can examine how extern variables are done. Even if you don’t understand any French, you might want to have a look here https://www.prorealcode.com/courses/premiers-pas-avec-la-programmation-pour-prorealtime/
Hope this will help you for the beginning.