Good morning,
I have a problem with quote. I explain.
I have an EA which call an icustom and in the setting I give a pair name. For to be sure the data which used by the icustom is good, I write in a file the iclose (iclose(pair name,0,0), I want the current close ) of the pair. And I don't have the good quote.
I precise, the EA is on a chart and the pair is on this chart is an other I give in the setting of icustom, and the timeframe is daily
What is the problem, please, how can I have the good quotes (sometimes the quotes is good and sometimes no)? I work like this, because my EA use 16 pairs and I can't open a chart for each pair.
Thank's a lot for your answer.
Try using MarketInfo( pair, MODE_ASK ) && MarketInfo( pair, MODE_BID ).
If you're getting Error Messages, Please provide the Error# you're getting.
datetime now = Time[0]; // or TimeCurrent() int iOP = iBarShift(OtherPair, OtherTF, now); double cOP = iClose(OtherPair, OtherTF, iOP);
Hi and thank's for your answer,
ubzen:
I tested your proposition and I don't have error, it return me BID and ASK, not the true BID and ASK but around this.
Whroeder:
What is the tester? For backtesting?? If it's that, no I didn't use, my problem is with a current system. I do my backtesting with an other soft.
I tested your proposition and I written this* in the init() for see what mt4 return me, and it return wrong close. At the first compilation sometime, it return 0, sometime a close around the true close, and at the second compilation it return the true close. It's the same thing if I use iclose(pair name,0,0).
*datetime now = TimeCurrent();
int iOP = iBarShift("AUDNZD", 0, now);
double cOP = iClose("AUDNZD", 0, iOP);
Print(cOP);
For information, if the chart of the pair ttaht I want the close is open, the result return by iclose(pair name,0,0) is good, but I work with 16 pairs, and I can't open the 16 charts.
Other proposition??
Ok thank's,
but how can I do for have the good close without open all the charts?
Thank's again for your help.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Good morning,
I have a problem with quote. I explain.
I have an EA which call an icustom and in the setting I give a pair name. For to be sure the data which used by the icustom is good, I write in a file the iclose (iclose(pair name,0,0), I want the current close ) of the pair. And I don't have the good quote.
I precise, the EA is on a chart and the pair is on this chart is an other I give in the setting of icustom, and the timeframe is daily
What is the problem, please, how can I have the good quotes (sometimes the quotes is good and sometimes no)? I work like this, because my EA use 16 pairs and I can't open a chart for each pair.
Thank's a lot for your answer.