- Eurusd/gbpusd
- How to open 4 timeframe at the same time?
- A question about MACD...
All prices of the candles on the chart have been/are Bid - but if you don't know the difference between Ask and Bid - google before you start risking money!
Hi, surly I know what is Ask and Bid. But OP_BUY, you set Ask. But OP_SELL, you set Bid. Right?
Sofar I understand, the Close[0] is the current price. That means, by BUY, it is the Ask. By SELL, it should be the Bid. Right?
Hi, surly I know what is Ask and Bid. But OP_BUY, you set Ask. But OP_SELL, you set Bid. Right?
Sofar I understand, the Close[0] is the current price. That means, by BUY, it is the Ask. By SELL, it should be the Bid. Right?
As I wrote all the prices of a candle on the chart (op, hi,lo,cl) are/have been Bid-prices!
Because of Bid and Ask it is quite simple, no matter what you are doing you'll always get the worse price: You buy at Ask and sell at Bid.
In addition to Carl,
the Close[] is never same Ask/Bid as thomas2004 believes
I think they are the same, right?
The Close[] is equal the Bid ONLY when it has zero "Close[0]" but when another number used then it will refer to that candle shift
so, Close[] is an array
Ask/Bid are only the current candle at a moment...
double Close[]
Series array that contains close prices for each bar of the current chart.
Series array elements are indexed in the reverse order, i.e., from the last one to the first one. The current bar which is the last in the array is indexed as 0. The oldest bar, the first in the chart, is indexed as Bars-1.
Example:
int handle = FileOpen("file.csv", FILE_CSV|FILE_WRITE, ";"); |
Close[0] is the closing price of the current bar/candle. However, since it hasn't closed yet, the "closing price" isn't meaningful. As stated previously, Close[] is an array that contains the closing prices of the completed bars/candles. 0 is the current bar/candle, 1 is the index of the one before that, etc. Ask is the current price that you would buy at. Bid is the current price that you would sell at. To make that clearer Ask is like the price of a car someone wants to sell at. If you want to buy the car, that's the price you have to pay. Bid is like the price of a car you want to sell. If someone wants to buy it from you, but only at a certain price, that's the price you have to sell to them at. I'm not sure that Close[0] would give you anything since, as mentioned above, bar 0 is the current bar and hasn't closed yet. It would probably return 0 because there isn't a closing value for the bar, Hope this helps clear things up.
Jeffrey Irick: It would probably return 0 because there isn't a closing value for the bar,
| Wrong. It returns the current Bid price, which is the close price if there are no more ticks in the current candle's period. There is no probably. |
Wrong. It returns the current Bid price, which is the close price if there are no more ticks in the current candle's period. There is no probably. |
I stand corrected. Cranky as ever I see, Roeder. :-)
To be clear, Close[n] is always defined from the final Bid price for candle n, for any n in range 0..earliest, regardless of broker or any other factor. Right?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use