| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Getting information from and Indicator https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=835 |
Page 1 of 1 |
| Author: | willmalou [ Mon Sep 24, 2012 3:12 am ] |
| Post subject: | Getting information from and Indicator |
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); |
|
| Author: | garyfritz [ Mon Sep 24, 2012 4:07 am ] |
| Post subject: | 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. |
|
| Author: | lucklogic [ Mon Sep 24, 2012 10:25 am ] |
| Post subject: | Re: Getting information from and Indicator |
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 |
|
| Author: | willmalou [ Mon Sep 24, 2012 11:16 am ] |
| Post subject: | 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. |
|
| Author: | gaheitman [ Mon Sep 24, 2012 11:31 am ] |
| Post subject: | 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. George |
|
| Author: | garyfritz [ Mon Sep 24, 2012 3:49 pm ] |
| Post subject: | 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. |
|
| All times are UTC | Page 1 of 1 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|