Vertical Line

what is the best way to draw a vertical line on price? lets say at a given time... like 8AM CST... and I mean doing so automatically via a custom indicator, not via messing around with my page or instrument sessions.


  • Hi,

    You can achieve this in a few steps:
    1) Create a Custom Study with the following formula:
    IF( LocalHour(@) XABOVE 7, 1000000, none)
    2) Add the study to your chart (which should compress the chart)
    3) Right click on the chart and select "Modify all study parameters".
    4) Click on the ">>>" that correspond to your Custom Study and select "Display" = Histogram and Sharescale = "On"
    5) Click on "Set Default and OK"

    6) Lastly, on the chart, right-click on the Price Scale and select "Autoscale without Studies"
  • cool, that worked. would you mind explaining what the code is doing? that way I can understand it. I get the settings, but curious why use a crossover...
  • Xbove allow you to set a point for the line to be displayed.
Sign In or Register to comment.