So how you can see on the picture below, normaly the entry point should have been at the point 1, but the EA bought at point 2. The conditions at the point 2 are good, but it should have been at the point 1
It looks like your Indicator repaints. What your EA saw during Bar 0 may be different to what is displayed when Bar 0 becomes Bar 1. If you want to know what your EA saw for Bar 0 print it . . .
Thank's for your answer,
I printed informations about indicators, and they are right, the indicators not repaint. At bar 0 the informations about bar 1 are good, I printed this every 10 minutes.
So when I printed it every 30 minutes one time, they are not printed and I don't know why.
Thank's.
- You don't show us the values of BandMoins1, nor the code. Since there are no mind-readers here, there is no way for us to know why.
- If BandMoins1 is the blue line. You said "if(Low[1]<BandMoins1" and only at point two is the low below the blue line.
- You don't show us the values of BandMoins1, nor the code. Since there are no mind-readers here, there is no way for us to know why.
- If BandMoins1 is the blue line. You said "if(Low[1]<BandMoins1" and only at point two is the low below the blue line.
Good morning/afternoon,
You don't show us the values of BandMoins1, nor the code. Since there are no mind-readers here, there is no way for us to know why.
yes but the calcul is simple and it's right, it's just a SMA less ATR(period)*factor.
If BandMoins1 is the blue line. You said "if(Low[1]<BandMoins1" and only at point two is the low below the blue line.
BandMoins1= yellow line.
Thank's.
Good morning,
at the beginning, scuse for my language, but I'm not english.
I have a probleme and I don't understand where did it come from.
The CCI value for the bar before the bar marked 1 may well have been -150, not < -150, can you confirm it's actual value please ?
Thank's,
it's a thing that I looked of course, and its value is -177.
Thank's,
it's a thing that I looked of course, and its value is -177.
OK, we can't see this from your chart Low[1]<BandMoins1 as your chart is H1 but you said the EA runs on M1
Thank's for your answe,
I'm not sure to understand well but:
My condition is:
if(Low[1]<BandMoins1 && iOpen(NULL,60,1)+0.001>=BandMoins1 && cci<-150 ){
treatment .............
}
At the point 1, on the picture whe can see well the CCI before is at -177 and iOpen(NULL,60,1)+0.001 is higher than bandmoins1
And at the point 1 the low of the candle is lower than bandmoins, so inevitably at a moment low[0] 1 minute have been lower than bandmoins no?
For more information, if I backtest this, it work normaly entry position it realized during the candle noted 1.
Thank's for your answe,
I'm not sure to understand well but:
My condition is:
if(Low[1]<BandMoins1 && iOpen(NULL,60,1)+0.001>=BandMoins1 && cci<-150 ){
treatment .............
}
At the point 1, on the picture whe can see well the CCI before is at -177 and iOpen(NULL,60,1)+0.001 is higher than bandmoins1
And at the point 1 the low of the candle is lower than bandmoins, so inevitably at a moment low[0] 1 minute have been lower than bandmoins no?
In real time ? no, if you had an interruption in your connection at that point it 's possible to miss a M1 bar ad have it arrive later, hence your Strategy Test would work. Alternatively you might have had an error when the order was attempted to be placed, do you check the return value from your OrderSend() and report all errors ?
Thank's,
It's possible I had a interruption in my connection and I fail the trade, so in 1 hour there are 60 candles and miss it 60 time?!
Then, in my first message I wrote:
In the treatment if ordesend is false I write in the log file, and log file is empty.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- 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,
at the beginning, scuse for my language, but I'm not english.
I have a probleme and I don't understand where did it come from.
The entry condition of my EA is:
cci=iCustom(NULL,60,"CCI_Mtf_custom",0,CCIPeriod,0,1);if(Low[1]<BandMoins1 && iOpen(NULL,60,1)+0.001>=BandMoins1 && cci<-150 )
{
treatment .............
}
For more informations:
The timeframe where the EA is plotted is 1 minutes.
CCI and BandMoins1 are calculated on 60 minutes.
And if I test the EA it works normaly.
So how you can see on the picture below, normaly the entry point should have been at the point 1, but the EA bought at point 2. The conditions at the point 2 are good, but it should have been at the point 1.
I added a print for to see if the datas of, CCI, BandMoins1 and so on are good and the datas are good.
For more information in the "treatment " if ordesend is false I write in the log file, and log file is empty, so the problem come from the EA don't see the conditions like well.
Do you have an idea where the problem come from please?
Thank's a lot for your answer and your time.