Specific Candle Information.

Created at 17 Feb 2014, 01:57
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
David's avatar

David

Joined 28.09.2013

Specific Candle Information.
17 Feb 2014, 01:57


Hello,

I have a trading bot that I wrote using MQL4 (metatrader 4) and I would like to convert it to cAlgo.

In mql4 to determine the Open and Close price of a candle would be as follows:

// get the open price of EURUSD, on the 1 minute timeframe, on the current candle shift(0)
double candle_open = iOpen("EURUSD",PERIOD_M1,0);

// get the close price of EURUSD, on the 1 minute timeframe, on the current candle shift(0)
double candle_close=iClose(Symbol(),PERIOD_M1,0);

If someone could please explain the appropriate format and syntax to do the same thing in a cAlgo bot, I would greatly appreciate it.

For reference here are the two links on the mql4.com documentation page:

http://docs.mql4.com/series/iopen

http://docs.mql4.com/series/iClose

Thank you for your assistance.

David


@David
Replies

David
17 Feb 2014, 04:06

RE:

I believe I have figured out exactly what I as trying to accomplish.

No response is needed. Thank you.


@David