Registered User Joined: 10/5/2010 Posts: 67
|
can I force a chart to end at say 2 pm on February 8, 2017 on a daily chart? Thanks.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
There really isn't a way to do this for the chart as a whole.
You can force an individual indicator to stop plotting at a certain date and time, but it isn't going to stop plotting the daily bar mid bar.
'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:Forced End Bar
'|******************************************************************
'# Year = UserInput.Integer = 2017
'# Month = UserInput.Integer = 2
'# Day = UserInput.Integer = 8
'# Hour = UserInput.Integer = 14
'# Minute = UserInput.Integer = 0
'# Second = UserInput.integer = 0
Static EndDate As Date
If isFirstBar Then
EndDate = New Date(Year, Month, Day, Hour, Minute, Second)
End If
If Price.DateValue <= EndDate Then
OpenValue = Price.Open
HighValue = Price.High
LowValue = Price.Low
Plot = Price.Close
Else
OpenValue = Single.NaN
HighValue = Single.NaN
LowValue = Single.NaN
Plot = Single.NaN
End If
-Bruce Personal Criteria Formulas TC2000 Support Articles
|