Hello I am trying to get information from TMASlopeMTF.
I use the following code to access the buffers but I do not get any information. I have the slope info code that is in steve's ea's but I do not know how to get the MA information to match what is in the indy. Can anyone help ?
HtfSlopeVal = iCustom(NULL,0,"TMASlopeMTFv1.02",14,500,2,false,true,false,false,false,false,false,true,1440,21,true,1,0);
MaVal = iCustom(NULL,0,"TMASlopeMTFv1.02",14,maxBars,lineWidth,false,true,false,false,false,false,false,true,MATimeFrame,MAPeriod,true,7,0);
Getting information from and Indicator
-
willmalou
- Trader
- Posts: 30
- Joined: Thu Dec 08, 2011 3:10 pm
-
garyfritz
Re: Getting information from and Indicator
I suspect it's because you're not passing nearly enough parameters. iCustom() expects you to pass ALL the parameters.
* It looks like you started with the fontSize parameter -- you didn't pass nonPropFont.
* You ended with addSundayToMonday. You didn't pass all the color inputs. I don't know how iCustom handles it if you leave off params at the end, but that's a likely problem.
* Finally, the gen, ind, etc externs are used as comments for us humans, but as far as MQL can tell, those are extern inputs. I'd bet you have to pass placeholder params for those.
* You passed 1440 for the MATimeFrame extern, and that's a string input. I'm not sure how iCustom() handles an integer passed in for a string param, but the indi only handles "D1" / "H4" / etc values. It happens that D1 is the default if it can't understand your input, but you should pass it "D1" instead of 1440.
So you'll need to do something like:
HtfSlopeVal = iCustom(NULL,0,"TMASlopeMTFv1.02","gen","Lucida Console",14,"ind",500,2,false,true,false,false,false,false,false,"ind_ma",true,"ind_tf","D1","ind_or",21,"ind_sm",true,"col",(((all the color constants))),1,0);
I haven't tested that but it should be a lot closer than what you had.
* It looks like you started with the fontSize parameter -- you didn't pass nonPropFont.
* You ended with addSundayToMonday. You didn't pass all the color inputs. I don't know how iCustom handles it if you leave off params at the end, but that's a likely problem.
* Finally, the gen, ind, etc externs are used as comments for us humans, but as far as MQL can tell, those are extern inputs. I'd bet you have to pass placeholder params for those.
* You passed 1440 for the MATimeFrame extern, and that's a string input. I'm not sure how iCustom() handles an integer passed in for a string param, but the indi only handles "D1" / "H4" / etc values. It happens that D1 is the default if it can't understand your input, but you should pass it "D1" instead of 1440.
So you'll need to do something like:
HtfSlopeVal = iCustom(NULL,0,"TMASlopeMTFv1.02","gen","Lucida Console",14,"ind",500,2,false,true,false,false,false,false,false,"ind_ma",true,"ind_tf","D1","ind_or",21,"ind_sm",true,"col",(((all the color constants))),1,0);
I haven't tested that but it should be a lot closer than what you had.
- lucklogic
- Trader
- Posts: 85
- Joined: Mon Jan 23, 2012 6:26 pm
- Location: On The Hoe in Plymouth, UK
Re: Getting information from and Indicator
willmalou wrote:Hello I am trying to get information from TMASlopeMTF.
I use the following code to access the buffers but I do not get any information. I have the slope info code that is in steve's ea's but I do not know how to get the MA information to match what is in the indy. Can anyone help ?
HtfSlopeVal = iCustom(NULL,0,"TMASlopeMTFv1.02",14,500,2,false,true,false,false,false,false,false,true,1440,21,true,1,0);
MaVal = iCustom(NULL,0,"TMASlopeMTFv1.02",14,maxBars,lineWidth,false,true,false,false,false,false,false,true,MATimeFrame,MAPeriod,true,7,0);
You do NOT have to list all of the parameters, I think that's where the confusion is
eg double DeMarkH3 = iCustom(Symbol(),PERIOD_H4,"DeMark Trendline Trader",2,1);
The DeMarker indicator is complex but the above iCustom () call's the High Trend Top
-
willmalou
- Trader
- Posts: 30
- Joined: Thu Dec 08, 2011 3:10 pm
Re: Getting information from and Indicator
Thanks I didn't see that MATimeFrame was a string input, I will change that, the reason I left off the color inputs I had them in there didn't make a difference. Thanks sometimes you just need someone to point out the obvious to you.
- gaheitman
- Trader
- Posts: 655
- Joined: Tue Nov 15, 2011 10:55 pm
- Location: Richmond, VA, US
Re: Getting information from and Indicator
I suspect you need to list all of them up to the point that you are willing to take the defaults. So, if you need to change the 1st parameter and the 10th, you need to list 2-9 as well.lucklogic wrote:willmalou wrote:Hello I am trying to get information from TMASlopeMTF.
I use the following code to access the buffers but I do not get any information. I have the slope info code that is in steve's ea's but I do not know how to get the MA information to match what is in the indy. Can anyone help ?
HtfSlopeVal = iCustom(NULL,0,"TMASlopeMTFv1.02",14,500,2,false,true,false,false,false,false,false,true,1440,21,true,1,0);
MaVal = iCustom(NULL,0,"TMASlopeMTFv1.02",14,maxBars,lineWidth,false,true,false,false,false,false,false,true,MATimeFrame,MAPeriod,true,7,0);
You do NOT have to list all of the parameters, I think that's where the confusion is
eg double DeMarkH3 = iCustom(Symbol(),PERIOD_H4,"DeMark Trendline Trader",2,1);
The DeMarker indicator is complex but the above iCustom () call's the High Trend Top
George
-
garyfritz
Re: Getting information from and Indicator
Yes, that would make sense, George. But willmalou, make sure you include all the parameters up through your last one, e.g. the font name and the "comment" placeholders.