Code: Select all
if(AccountNumber()!=11212){
ExpertRemove()};Code: Select all
if(AccountNumber()!=11212){
ExpertRemove()};You can do something like this in OnInit() of indicator:MicroSpiderfx » Mon Jun 27, 2016 8:12 pm wrote:Hi, I wanted to add account number limitation in my Indicator . I am doingBut Problem is that .. i dont know why its not working for indicator .. its working good in EA .Code: Select all
if(AccountNumber()!=11212){ ExpertRemove()};
Code: Select all
int OnInit() {
if ( AccountNumber() != 11212 ) {
Alert("Wrong account number ... ");
return( INIT_FAILED );
}
//---
return(INIT_SUCCEEDED);
}
Renexxxx,renexxxx » Mon Jun 27, 2016 6:31 pm wrote:
You can do something like this in OnInit() of indicator:
Code: Select all
int OnInit() { if ( AccountNumber() != 11212 ) { Alert("Wrong account number ... "); return( INIT_FAILED ); } //--- return(INIT_SUCCEEDED); }
Oh dear. There is not much code there, so I'm not sure what it is that could possibly be wrong. You didn't mention the compile error ...taipan » Sun Aug 28, 2016 12:30 am wrote: The coding seemed not to work with the latest Empty4 build 1010. Any update to make it work?
Hi Renexxxx,renexxxx » Sun Aug 28, 2016 3:33 pm wrote: Oh dear. There is not much code there, so I'm not sure what it is that could possibly be wrong. You didn't mention the compile error ...
I have tested the attached code under 1010. Mind you, I didn't feel like "upgrading" to 1010...
Anyway, it compiles and it works.
Over to you.
Send me the code and I will insert it for you. These screenshots don't help me much. I seems that you have inserted the code just willy nilly in the middle of the file.taipan » Sun Aug 28, 2016 9:34 pm wrote:
Need further help on where to insert the code correctly.
Renexxxx,renexxxx » Sun Aug 28, 2016 7:59 pm wrote:Send me the code and I will insert it for you. These screenshots don't help me much. I seems that you have inserted the code just willy nilly in the middle of the file.taipan » Sun Aug 28, 2016 9:34 pm wrote:
Need further help on where to insert the code correctly.
R.
... and screwed the first line completelyrenexxxx » 28 Aug 2016, 13:59 wrote:
I seems that you have inserted the code just willy nilly in the middle of the file.
R.