View Single Post
How to calculate the Close and Open price of candle?
  #1 (permalink)  
Old 09-01-2005, 04:20 PM
scorpion's Avatar
scorpion scorpion is offline
Administrator
 
Join Date: Aug 2004
Posts: 1,958
Thanks: 117
Thanked 383 Times in 152 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Send a message via MSN to scorpion Send a message via Yahoo to scorpion
Default How to calculate the Close and Open price of candle?

Hey,

I'm a little stuck here while making a modification in broker interface. Now I need to write a function that correctly recalculate the OHLC prices of candles in metatrader platform.

Metatrader 3 chart combines both Bid and Ask price in the same candle (High of candle is the highest ask price, Low is the lowest bid price, Open and Close = Bid + Ask / 2). What I'd like to do here is to recalculate candle OHLC to be based in Bid price only. It seems easy, but...

The problem here is how to calculate the Open and Close price when the result of Bid + Ask / 2 is need to be round up (has a value smaller in a pip). Example, Bid + Ask /2 of EURUSD = 1.24485. This price cannot be display on chart, so what is the way to round it? I've observed this for a day now, and i'm still very confused. Sometimes, MetaTrader round it down to 1.2448, but sometimes round it up to 1.2449.

Hope you can help me with this.
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.

Last edited by scorpion : 09-01-2005 at 04:23 PM.
Reply With Quote
ProFX Powerful Trading System

Registered members have access to special online forex currency trading tools, software, mt4 expert advisors and indicators. Register now

Main Menu

Economic Forecast