BID/ASK as price line

Hi, i am trying to get bid and ask as the price line but failing . I am able to get only the last value of bid and ask plotted. the code i am using is

b = GetRTData("Bid");
a = GetRTData("Ask");


The GetRTData() clearly mentions that it returns value of type NUMBER.
This is not an Array and therefore cannot be passed to Plot() and expect a Line to be plotted.

If you however want to achieve this, then use an array static variable and update the last element continuously.
Since bid/ask is not like volume, your query isn't complete and hence just the pointer above.

What I mean is, you need to define how you will update the most recent value, either as overwrite or cumulatively ( but doesnt make much sense)

Then you can plot the array and retain the past values.


Hi All, I see this is a interesting thread.
I´m getting the Bid/Ask Data from Aux1/2 on IQFeed RT Data and i would like to plot it on the chart but i am also stuck on the same problem ap1122 exposed before.
So, how can i convert these data to a continuous array to plot them correctly on the chart?
I tried several options for taking it like an array, as it was exposed, but none plot a continuous line.


Plot( Aux1, "IQFeed Aux1", colorRed, styleLine );
Plot( Aux2, "IQFeed Aux2", colorGreen, styleLine );

We don't know what you tried.

Hi fxshrat,
Thanks for helping. Using AUX1/2, it´s exactly what i now have. But the problem is these lines fluctuate on my chart, not just the last bid/ask price, but all the line. They are not like a standar or fixed plot, so i thought i have to do something more on the code.
Maybe this occurs for the Tick data we get?.

I see this fluctuation of the Bid/ask Line occurs only when using Tick Chart Interval. On Minutes or even Seconds it´s like a regular plot. Not moving at all.
But It still moves, on Minute/Seconds timeframe, if i create a new Array, using the Bid/Ask with other data like the BidVol, using:

volBid = GetRTData( "BidSize" );

Suppose this occurs as the new data (Bidsize) is not an array, it´s just a number and using it affects ALL the Bid array in the same way. So , how can i convert the Bidsize to a new Array for using it?