Help!
I can't control the indicator from the EA. See attached line 287 EA problem.
I originally had all the inputs to the Indicator but no luck.
Thanks
Ray
Can't control indicator from the EA
- traderduke
- Trader
- Posts: 306
- Joined: Mon Nov 28, 2011 7:30 pm
- Location: East Coast USA
Can't control indicator from the EA
You do not have the required permissions to view the files attached to this post.
-
fxprotrader
- Trader
- Posts: 26
- Joined: Sat Jun 16, 2012 11:26 pm
Re: Can't control indicator from the EA
Ray-traderduke wrote:Help!
I can't control the indicator from the EA. See attached line 287 EA problem.
I originally had all the inputs to the Indicator but no luck.
Thanks
Ray
You must enter all the parameters into the iCustom and must be defined as the correct type. You can exclude string comments but other than that you will need to enter them all.
-
dietcoke
- Trader
- Posts: 162
- Joined: Tue Nov 15, 2011 9:59 pm
Re: Can't control indicator from the EA
Take a look at the indicator. All the externals have a default value. This means you could runfxprotrader wrote:Ray-traderduke wrote:Help!
I can't control the indicator from the EA. See attached line 287 EA problem.
I originally had all the inputs to the Indicator but no luck.
Thanks
Ray
You must enter all the parameters into the iCustom and must be defined as the correct type. You can exclude string comments but other than that you will need to enter them all.
Code: Select all
trend = iCustom(NULL,0,"RK-Sidus_V11");However, when you do this:
Code: Select all
trend = iCustom(NULL,0,"RK-Sidus_V11",analogytype,5,0);Think of the indicator as a function call where the function has been declared with a lot of default values
eg
Code: Select all
void somefunction(string symbol, int tf=PERIOD_D1, int length=3, bool cmd=true)if you want to call this function with cmd=false then you MUST also provide a value for length and tf even though you want to use the defaults.
eg,..
Code: Select all
//This is fine.
somefunction(SYMBOL(),PERIOD_D1,3,false)
// This won't work
somefunction(SYMBOL(),false)
Persnally, I would customise the indicator so that the parameters you want to vary are right at the top of the list.
- traderduke
- Trader
- Posts: 306
- Joined: Mon Nov 28, 2011 7:30 pm
- Location: East Coast USA
Re: Can't control indicator from the EA
Fella's
FP thank you very much for your help.
DC thanks for providing an in depth solution. I streamlined my indicator & tried to mimic the inputs but for some reason I am missing an input or have the order or list wrong. I have added an option for the short & working indicator control, versus the long & non-working EA control. Any chance you can get the EA control to work?
Thanks again for your help
Ray
FP thank you very much for your help.
DC thanks for providing an in depth solution. I streamlined my indicator & tried to mimic the inputs but for some reason I am missing an input or have the order or list wrong. I have added an option for the short & working indicator control, versus the long & non-working EA control. Any chance you can get the EA control to work?
Thanks again for your help
Ray
You do not have the required permissions to view the files attached to this post.
-
dietcoke
- Trader
- Posts: 162
- Joined: Tue Nov 15, 2011 9:59 pm
Re: Can't control indicator from the EA
As far as Empty4 is concerned the string comments are variables. Comment them out from the indicator and try againtraderduke wrote:Fella's
FP thank you very much for your help.
DC thanks for providing an in depth solution. I streamlined my indicator & tried to mimic the inputs but for some reason I am missing an input or have the order or list wrong. I have added an option for the short & working indicator control, versus the long & non-working EA control. Any chance you can get the EA control to work?
Thanks again for your help
Ray
- gaheitman
- Trader
- Posts: 655
- Joined: Tue Nov 15, 2011 10:55 pm
- Location: Richmond, VA, US
Re: Can't control indicator from the EA
This code calls the indicator using all the defaults. That should help you map out your variables correctly.traderduke wrote:Fella's
FP thank you very much for your help.
DC thanks for providing an in depth solution. I streamlined my indicator & tried to mimic the inputs but for some reason I am missing an input or have the order or list wrong. I have added an option for the short & working indicator control, versus the long & non-working EA control. Any chance you can get the EA control to work?
Thanks again for your help
Ray
Code: Select all
//+------------------------------------------------------------------+
// script program start function
//+------------------------------------------------------------------+
int start()
{
Alert(iCustom(NULL,0,"RK-sidus_v12","","","","","",3,2,13,0.0001,50,8,55,45,24,90,1500,true,false,true,true,false,5,0));
Alert(iCustom(NULL,0,"RK-sidus_v12","","","","","",3,2,13,0.0001,50,8,55,45,24,90,1500,true,false,true,true,false,5,1));
Alert(iCustom(NULL,0,"RK-sidus_v12","","","","","",3,2,13,0.0001,50,8,55,45,24,90,1500,true,false,true,true,false,5,23));
return(0);
}
//- traderduke
- Trader
- Posts: 306
- Joined: Mon Nov 28, 2011 7:30 pm
- Location: East Coast USA
Re: Can't control indicator from the EA
Fella's
It works!! Thanks for the help you were both correct but with 2 different approaches. I seem to have a better understanding of the process thanks to both your answers.
Thanks again
Ray
It works!! Thanks for the help you were both correct but with 2 different approaches. I seem to have a better understanding of the process thanks to both your answers.
Thanks again
Ray
- SteveHopwood
- Owner
- Posts: 9904
- Joined: Tue Nov 15, 2011 8:43 am
- Location: Misterton - an insignificant village in England. Very pleasant to live in.
Re: Can't control indicator from the EA
Ray, great to see you embarking on the road I started a few years ago. You have a few headaches to come, but ultimately will not be sorry you decided to learn to code this stuff.
FWIW, the more inputs a Crap Custom Abortion (aka Custom Indi) has, the less likely it is that a call to the damn thing will return a useful result. No idea why, but 'tis a fact of life. Mq4 is not described as CrapQ4 merely because I have a warped sense of humour.
The first thing I do when faced by a CCA is look at the number of extern's. When I am given the source code and the externs number more that 5, then I look to do a modified version of the CCA that cuts down on the externs, and release it as '........ For Automation.mq4'
Mostly after that I conclude it is an UCCA (Utter Crap Custom Abortion) and abandon the project, but that is another story.

FWIW, the more inputs a Crap Custom Abortion (aka Custom Indi) has, the less likely it is that a call to the damn thing will return a useful result. No idea why, but 'tis a fact of life. Mq4 is not described as CrapQ4 merely because I have a warped sense of humour.
The first thing I do when faced by a CCA is look at the number of extern's. When I am given the source code and the externs number more that 5, then I look to do a modified version of the CCA that cuts down on the externs, and release it as '........ For Automation.mq4'
Mostly after that I conclude it is an UCCA (Utter Crap Custom Abortion) and abandon the project, but that is another story.
Read the effing manual, ok?
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
- traderduke
- Trader
- Posts: 306
- Joined: Mon Nov 28, 2011 7:30 pm
- Location: East Coast USA
Re: Can't control indicator from the EA
Steve,
Thanks I'll keep that in mind! The funny thing is I needed to optimize the v12 to prove that 9 of the 12 cases were useless. I trimmed it back to 2 cases Ma w/diff & rsi.
Great forum, Steve. The helpfulness of the members is outstanding.
Ray
Thanks I'll keep that in mind! The funny thing is I needed to optimize the v12 to prove that 9 of the 12 cases were useless. I trimmed it back to 2 cases Ma w/diff & rsi.
Great forum, Steve. The helpfulness of the members is outstanding.
Ray
SteveHopwood wrote:Ray, great to see you embarking on the road I started a few years ago. You have a few headaches to come, but ultimately will not be sorry you decided to learn to code this stuff.
FWIW, the more inputs a Crap Custom Abortion (aka Custom Indi) has, the less likely it is that a call to the damn thing will return a useful result. No idea why, but 'tis a fact of life. Mq4 is not described as CrapQ4 merely because I have a warped sense of humour.
The first thing I do when faced by a CCA is look at the number of extern's. When I am given the source code and the externs number more that 5, then I look to do a modified version of the CCA that cuts down on the externs, and release it as '........ For Automation.mq4'
Mostly after that I conclude it is an UCCA (Utter Crap Custom Abortion) and abandon the project, but that is another story.![]()
