New version 18 available now

Download software Tutorial videos
Subscription & data-feed pricing Class schedule

New account application Trading resources
Margin rates Stock & option commissions

Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

force a date and time Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Posted : Friday, February 10, 2017 3:40:55 PM
Platinum Customer Platinum Customer

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.

Posted : Friday, February 10, 2017 4:53:11 PM

Worden Trainer

Joined: 10/7/2004
Posts: 62,989

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 
'|*** 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
	OpenValue = Single.NaN
	HighValue = Single.NaN
	LowValue = Single.NaN
	Plot = Single.NaN
End If

Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.