10.7/10.9 INDI SOLUTIONS

This is where Bob posts his own threads
Post Reply
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

10.7/10.9 INDI SOLUTIONS

Post by milanese »

freeman » Mon Jun 09, 2014 2:33 am wrote:
Tommaso,
Just noticed that in addition to doing a shipload of coding, pointing people in the right direction (as you did for me), you also provide general IT help. Be Blessed!
Thank you, I just try to help when I can..

Cheers :)

Tommaso
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
genaja
Trader
Posts: 52
Joined: Wed Mar 21, 2012 12:42 pm

10.7/10.9 INDI SOLUTIONS

Post by genaja »

Hi volks,

my Empty4 Build 646 often crashes with the 10.7 templates. So I checked the used indicators.

At the indicator 10.7 INDI DP.mq4 I received a compilation warning:

Code: Select all

declaration of 'i' hides global declaration at line 76	10.7 INDI DP.mq4	237	8

I think that is not the big mistake, but I will fix that.

Question:
What must I do to terminate that warning message?


Thanks a lot!
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

10.7/10.9 INDI SOLUTIONS

Post by milanese »

genaja » Thu Jun 12, 2014 9:17 am wrote:Hi volks,

my Empty4 Build 646 often crashes with the 10.7 templates. So I checked the used indicators.

At the indicator 10.7 INDI DP.mq4 I received a compilation warning:

Code: Select all

declaration of 'i' hides global declaration at line 76	10.7 INDI DP.mq4	237	8

I think that is not the big mistake, but I will fix that.

Question:
What must I do to terminate that warning message?


Thanks a lot!
this is a warning not causing any error, but you can attch your indi, if you want the warning removed, I will do it..

Cheers :)

Tommaso
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
genaja
Trader
Posts: 52
Joined: Wed Mar 21, 2012 12:42 pm

10.7/10.9 INDI SOLUTIONS

Post by genaja »

this is a warning not causing any error, but you can attch your indi, if you want the warning removed, I will do it..

Cheers :)

Tommaso
Hi Tommaso,

I know that this is only a warning. But I think that have to do with the new
coding roules of the Empty4 6.x Version.

I had an other indi with warnings too. So if I learn what goes wrong, I am able
to fix the other warnings too.

At the DP Indicator is the problem, that the variable i is global?

So the variable must be initialisated inside the init() part?
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

10.7/10.9 INDI SOLUTIONS

Post by milanese »

genaja » Thu Jun 12, 2014 9:31 am wrote:
this is a warning not causing any error, but you can attch your indi, if you want the warning removed, I will do it..

Cheers :)

Tommaso
Hi Tommaso,

I know that this is only a warning. But I think that have to do with the new
coding roules of the Empty4 6.x Version.

I had an other indi with warnings too. So if I learn what goes wrong, I am able
to fix the other warnings too.

At the DP Indicator is the problem, that the variable i is global?

So the variable must be initialisated inside the init() part?
the error means that you use in a function for a new only functionwide intialised variable the same name, as for a global used variable , what indeed should be avoided in clean coding, just rename i in the function..

Cheers :)

Tommaso
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
genaja
Trader
Posts: 52
Joined: Wed Mar 21, 2012 12:42 pm

10.7/10.9 INDI SOLUTIONS

Post by genaja »

I made a test:

delete the
int i;
from global initialisation.

set into the init() section:

Code: Select all

   pregap=""; 
   int i;  
   for(i=0; i<text_shift;i++) pregap = pregap + " ";
   if(addMidLevels == true) timeframe_prefix = timeframe_prefix + "Mid ";
   timeframe_prefix_text = pregap + timeframe_prefix;
      
   SetIndexLabel(0,timeframe_prefix + "Pivot Point");

The indi works an I receive no warnings.

Is that the solution??
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

10.7/10.9 INDI SOLUTIONS

Post by milanese »

genaja » Thu Jun 12, 2014 9:38 am wrote:I made a test:

delete the
int i;
from global initialisation.

set into the init() section:

Code: Select all

   pregap=""; 
   int i;  
   for(i=0; i<text_shift;i++) pregap = pregap + " ";
   if(addMidLevels == true) timeframe_prefix = timeframe_prefix + "Mid ";
   timeframe_prefix_text = pregap + timeframe_prefix;
      
   SetIndexLabel(0,timeframe_prefix + "Pivot Point");

The indi works an I receive no warnings.

Is that the solution??
yes sure that is here the solution :)

Cheers :)

Tommaso
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
genaja
Trader
Posts: 52
Joined: Wed Mar 21, 2012 12:42 pm

10.7/10.9 INDI SOLUTIONS

Post by genaja »

the error means that you use in a function for a new only functionwide intialised variable the same name, as for a global used variable , what indeed should be avoided in clean coding, just rename i in the function..

Cheers :)

Tommaso
That means, it is alowed to use always i at any loops, but only in separate funktions?

Is it wrong to use one times var i at init() section and one time at start() section?
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

10.7/10.9 INDI SOLUTIONS

Post by milanese »

genaja » Thu Jun 12, 2014 9:44 am wrote:
the error means that you use in a function for a new only functionwide intialised variable the same name, as for a global used variable , what indeed should be avoided in clean coding, just rename i in the function..

Cheers :)

Tommaso
That means, it is alowed to use always i at any loops, but only in separate funktions?

Is it wrong to use one times var i at init() section and one time at start() section?
no, you can use it in all functions, if you have defined i as a global variable.

Cheers :)

Tommaso
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
genaja
Trader
Posts: 52
Joined: Wed Mar 21, 2012 12:42 pm

10.7/10.9 INDI SOLUTIONS

Post by genaja »

That means, it is alowed to use always i at any loops, but only in separate funktions?

Is it wrong to use one times var i at init() section and one time at start() section?
no, you can use it in all functions, if you have defined i as a global variable.

Cheers :)

Tommaso

Hmm, I am a little confused. :)

First var i was not alowed as global, now it is possible?

Is the global var i only o.k. if the var i was not defined at other functions, only as global?
Post Reply

Return to “Bob's individual forum”