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

Eliminating 0 values in MarketDataReader Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Nelane
Posted : Tuesday, October 5, 2010 3:00:05 PM
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)
Bruce_L
Posted : Tuesday, October 5, 2010 3:25:53 PM


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
jas0501
Posted : Saturday, October 9, 2010 5:10:20 PM
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.
Users browsing this topic
Guest-1

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.