Hi Coders!
I have an indicator, called: ptl 2 & alerts (attached)
I would like to use it in an EA with the iCustom() function. I would like to run the EA on a M5 chart, and use the Indicator with TimeFrame="15" input variable.
But there's a bit problem. The EA reads diffrent indicator datas. When I attach the indicator to the chart and move the mouse under one bar, the Data Window shows diffrent indicator data as the EA read.
How can my chart show diffrent data then the EA? Have you got any idea?
Thank you in advance.
Relative
Do you check the indicator value on m15 chart and not on the chart of your EA?
How can my chart show diffrent data then the EA? Have you got any idea?
Thank you in advance.
Relative
The EA reads diffrent indicator datas.
Your call is wrong.
https://www.mql5.com/en/forum/132304
http://www.forexfactory.com/showthread.php?t=139394
"if you manually add an "MTF" indicator to a visual-mode backtesting chart, then it can see into the future on higher timeframes."
Don't think so.
double ptl4_1 = iCustom(NULL,0,"ptl 2 & alerts","15",7,0,3,0,false,false,false,false,false,false,false,false,4,1); double ptl5_1 = iCustom(NULL,0,"ptl 2 & alerts","15",7,0,3,0,false,false,false,false,false,false,false,false,5,1);
Where did you test this ? Live/Demo or in the Strategy tester ?
Don't think so.
Yes think so :D.
Dunno how your CI works but try this
double ptl4_1 = iCustom(Symbol (), PERIOD_M15,"ptl 2 & alerts","15",7,0,3,0,false,false,false,false,false,false,false,false,4,1); double ptl5_1 = iCustom(Symbol (), PERIOD_M15,"ptl 2 & alerts","15",7,0,3,0,false,false,false,false,false,false,false,false,5,1);
Buffers 4 & 5 are both arrow style . . .
SetIndexBuffer(4,arrod); SetIndexStyle(4,type3); SetIndexArrow(4,159); SetIndexBuffer(5,arrou); SetIndexStyle(5,type3); SetIndexArrow(5,159);
when you look at the data window you need to remember that it helpfully numbers the buffers as firstly, timeframe ptl then Value 2, value 3, etc . . . so they start at 1 not zero . . . make sure you are looking at Values 5 & 6. Then you have to remember that you only get a sensible value in the buffer when there is an arrow, otherwise the buffer value defaults to EMPTY_VALUE (0x7FFFFFFF)
Seems to be working just fine . .
Yes think so :D.
Dunno how your CI works but try this
Doesn't work.
Buffers 4 & 5 are both arrow style . . .
when you look at the data window you need to remember that it helpfully numbers the buffers as firstly, timeframe ptl then Value 2, value 3, etc . . . so they start at 1 not zero . . . make sure you are looking at Values 5 & 6. Then you have to remember that you only get a sensible value in the buffer when there is an arrow, otherwise the buffer value defaults to EMPTY_VALUE (0x7FFFFFFF)
Seems to be working just fine . .
Yes, I know. I would like to monitor the Value 5 & 6. But sometimes, I can't read that datas. I show you an EA:
In the left-top corner, you can see an infopanel. The last six rows show the values of the indicator at the [1] bar.
But you can realize, sometimes, the datas in the infopanel don't match with the values in the Data Window. And I don't know why!
(This happend, when I use the indicator with diffrent TimeFrame input variable as the current chart.)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi Coders!
I have an indicator, called: ptl 2 & alerts (attached)
I would like to use it in an EA with the iCustom() function. I would like to run the EA on a M5 chart, and use the Indicator with TimeFrame="15" input variable.
But there's a bit problem. The EA reads diffrent indicator datas. When I attach the indicator to the chart and move the mouse under one bar, the Data Window shows diffrent indicator data as the EA read.
How can my chart show diffrent data then the EA? Have you got any idea?
Thank you in advance.
Relative