Good morning,
I use an icustom function to look up the value of a buy or sell indicator in the previous candle:
ex:
double xyz (int index, int shift)
{
return (iCustom (Symbol (), PERIOD_H1, "indicator", index, shift));
}
then in the ontick function I specify the following:
if (
xyz (1,1) <= - 5&& stdscore (1, 1)! = EMPTY_VALUE)
{
ordersend ..... etc}
My indicator does not give a signal for each candle but only when there are certain conditions.
Suppose I want to find the first value in the last 100 candles before the current one. I don't know if it's the candle -2 or -5 or -20 etc ...
how can I do?
Thanks
- How Indicator performs when it's called by an EA
- Buffer is not changing while using the CopyBuffer-Function
- Please check my first EA :)
Claudio Lasso: Suppose I want to find the first value in the last 100 candles before the current one.
When in doubt, think! int iLast=1; while( xyz(1, iLast) == EMPTY_VALUE) ++iLast;
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register