Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 10/7/2004 Posts: 56
|
How can I make MarketDataReader (code below) to not display zero on the chart when there is no data or the data is 0 for a particular date/time.
I tried to refer to data reader from another indicator:
If MarketDataReader.value <> 0 then plot = MarketDataReader .value
but it didn't work.
And also, how to make MarketDataReader display OHLC data?
Sub New
autoloop = False
End Sub
Public Overrides function Plot() as System.Single
Dim reader As New MarketDataReader("mydata.txt")
reader.dateindex = 0
reader.valueindex = 1
reader.delimiter = ","
reader.outputfile(Me)
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I don't know if you can make the RealCode Market Date Reader selectively not output specific data based on what was read. I'm not a programmer.
That said, the RealCode File Reader allows you to assign the values read to any variables you want. Since you are explicitely outputting the values using AddToOutput(), you could check these values before deciding if you want ot output those variables or not.
I would use the RealCode File Reader to read the data you wish to display and use AddToOutput(Date & Time, Open, High, Low, Close) to output OHLC data. The Plot Style for the Indicator would also need to be set to something displaying OHLC data such as Candlestick or OHLC Bar.
RealCode File Reader Overview
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/31/2005 Posts: 2,499
|
Alternates to the zero would be to
1. display H = L = O = C = yesterday's close with volume = 0 instead of a data gap.
2. not output anything.
Note there are many instances of missing data, item 2. You can visually detect them by plotting prices as bars and including a price history of a symbol without any gaps, as in an index. Without the alternate symbol price history the chart compresses and the data gaps don't show.
|
|
Guest-1 |