I have a data set with historical prices (forex but I'm assuming it can be about stocks as well) - open, low, high, close - but there's two of each - bidopen, askopen etc. I want to use those data for calculation, for example MACD or stochastic oscilator. It would be easier if there was just the set of four prices for each day - but the set of data I have confused me.

If I want to do calculations - do I need to calculate average for every bid-ask pair, for example if I want open for a particular day do I calculate bidopen+askopen/2 ?

In both cases - MACD and stochastic oscillator - the calculation are meant to set points of buying and selling, but I buy using ask prices and I sell using bid prices... I know I am missing something but googling failed, I guess I don't know how to ask. I hope I managed to explain what is my problem above though.

Can somebody please explain what I'm missing? Or suggest sources where I could learn. Or both...

1 Answer 1


If you are looking to go long (buy) you would use bid prices as this is what you will be matched against for your order to be executed and a trade to go through.

If you are looking to go short (sell) you would use the ask prices as this is what you will be matched against for your order to be executed and a trade go through.

In your analysis you could use either this convention or the midpoint of the two prices. As FX is very liquid the bid and ask prices would be quite close to each other, so the easiest way to do your analysis is to use the convention I listed above.

  • I'm not sure if I understand correctly... My confusion is caused exactly by the 'duality' of prices. If I want to use the daily prices to calculate stochastic oscillator and use the crossover points of %K and %D - should I have two charts/calculations? : bid to find the points where to buy and ask to find the points where to sell? I don't know if this sounds silly but I haven't found any source where I could learn about this.
    – PiterS
    Commented Jul 26, 2016 at 17:05
  • Or should I calculate the average of daily bid/ask and use it for the anaylysis - is this what you meant by 'midpoint'?
    – PiterS
    Commented Jul 26, 2016 at 17:06
  • If you continue to use this data set then yes the best way is to have 2 charts, one for buying and one for selling. You don't have to calculate the stochastic as most charting software have most of the indicators. Is this data set provided by your broker? And yes mid-point is the average. Your other option is to use a third party provider that uses actual data (actual Open, High, Low and Close data from actual trades).
    – Victor
    Commented Jul 26, 2016 at 21:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .