Forex
Google

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course > Questions
Forex Forum Register FAQ Members List Calendar Today's Posts


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-04-2006, 09:05 PM
secxces's Avatar
secxces secxces is offline
Senior Member
 
Join Date: Nov 2005
Posts: 90
secxces is on a distinguished road
ERROR: Invalid Integer Number As Parameter

Hi All,

This is a quick question for all of you coding gurus out there.

Im in the process of designing anindicator. I thought it was finished and everything was good to go, and it seemed to look ok when loaded up. But then I started realizing, my 120 gig hard drive was filling up fast. After locating the biggest files on my computer, I realized they were in my log folder in the metatrader directory. One alone was for 37 gigs. Aparently, the indicator has an error that the compile ,in metaeditor, did not pick up on. And since then, every few seconds, an error comes up on the "Experts" tab, right next to the "Journal" tab on the bottum of the metatrader 4 gui. And writes it into a text log, which starts building size quickly.

The actual error is:

" ****** GBPUSD, M5: invalid integer number as parameter 5 for iMAonArray function"



I have tried to adjust a few things but cant seem to fix it. The indicator itself has always seemed to work properly, but it just seems MT4 processing is not happy.lol.

Anyone have any idea? Maybe someone ran into this similar problem before?

Thanks,
- secXces
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-04-2006, 11:26 PM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Quote:
Originally Posted by secxces
Hi All,

This is a quick question for all of you coding gurus out there.

Im in the process of designing anindicator. I thought it was finished and everything was good to go, and it seemed to look ok when loaded up. But then I started realizing, my 120 gig hard drive was filling up fast. After locating the biggest files on my computer, I realized they were in my log folder in the metatrader directory. One alone was for 37 gigs. Aparently, the indicator has an error that the compile ,in metaeditor, did not pick up on. And since then, every few seconds, an error comes up on the "Experts" tab, right next to the "Journal" tab on the bottum of the metatrader 4 gui. And writes it into a text log, which starts building size quickly.

The actual error is:

" ****** GBPUSD, M5: invalid integer number as parameter 5 for iMAonArray function"



I have tried to adjust a few things but cant seem to fix it. The indicator itself has always seemed to work properly, but it just seems MT4 processing is not happy.lol.

Anyone have any idea? Maybe someone ran into this similar problem before?

Thanks,
- secXces
Hi secXces,

Could you send the indicator (or the part you think it makes the error)?
What's the MT build version?

Thanks!
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-04-2006, 11:55 PM
secxces's Avatar
secxces secxces is offline
Senior Member
 
Join Date: Nov 2005
Posts: 90
secxces is on a distinguished road
Quote:
Originally Posted by codersguru
Hi secXces,

Could you send the indicator (or the part you think it makes the error)?
What's the MT build version?

Thanks!
Build 193


"MA[shift] = iMAOnArray(RSI,0,MASlow1,0,MODE_EMA,shift)
for(shift=limit-1;shift>=0;shift--)"


I think thats were the error is. Maybe not thought..lol.

Last edited by secxces : 05-05-2006 at 12:03 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-05-2006, 02:24 AM
cockeyedcowboy's Avatar
cockeyedcowboy cockeyedcowboy is offline
Senior Member
 
Join Date: Nov 2005
Posts: 267
cockeyedcowboy is on a distinguished road
Quote:
Originally Posted by secxces
Hi All,

This is a quick question for all of you coding gurus out there.

Im in the process of designing anindicator. I thought it was finished and everything was good to go, and it seemed to look ok when loaded up. But then I started realizing, my 120 gig hard drive was filling up fast. After locating the biggest files on my computer, I realized they were in my log folder in the metatrader directory. One alone was for 37 gigs. Aparently, the indicator has an error that the compile ,in metaeditor, did not pick up on. And since then, every few seconds, an error comes up on the "Experts" tab, right next to the "Journal" tab on the bottum of the metatrader 4 gui. And writes it into a text log, which starts building size quickly.

The actual error is:

" ****** GBPUSD, M5: invalid integer number as parameter 5 for iMAonArray function"



I have tried to adjust a few things but cant seem to fix it. The indicator itself has always seemed to work properly, but it just seems MT4 processing is not happy.lol.

Anyone have any idea? Maybe someone ran into this similar problem before?

Thanks,
- secXces

The variable used as your 5 parameter pass to the function call should be an int type. You have declaired it to some other type variable. Check to see if the 5th parameter is not decleared as an integral type, or that it is in the limits of types used. that is an overflow on the input number. Only 0,1,2,3 are permitted.

double iMAOnArray(double array[], int total, int period, int ma_shift, int ma_method, int shift)



ConstantValueDescription
MODE_SMA 0 Simple moving average,
MODE_EMA 1 Exponential moving average,
MODE_SMMA 2 Smoothed moving average,
MODE_LWMA 3 Linear weighted moving average.

Last edited by cockeyedcowboy : 05-05-2006 at 02:30 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 05-25-2006, 02:50 PM
secxces's Avatar
secxces secxces is offline
Senior Member
 
Join Date: Nov 2005
Posts: 90
secxces is on a distinguished road
Quote:
Originally Posted by cockeyedcowboy
The variable used as your 5 parameter pass to the function call should be an int type. You have declaired it to some other type variable. Check to see if the 5th parameter is not decleared as an integral type, or that it is in the limits of types used. that is an overflow on the input number. Only 0,1,2,3 are permitted.

double iMAOnArray(double array[], int total, int period, int ma_shift, int ma_method, int shift)



ConstantValueDescription
MODE_SMA 0 Simple moving average,
MODE_EMA 1 Exponential moving average,
MODE_SMMA 2 Smoothed moving average,
MODE_LWMA 3 Linear weighted moving average.

Thanks cockeyedcowboy,

It took me a while but I finally figured it out. My hats off. Thanks again, -secXces
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
integer portion blackboxforex Questions 2 10-17-2006 06:11 PM
Error 130 - invalid stop. Why? Lou G Setup Questions 4 09-26-2006 04:41 PM
Please help Invalid stops Error 130 cardio Setup Questions 4 06-30-2006 04:31 PM
invalid account huhenyo Metatrader 4 4 04-03-2006 07:37 PM


All times are GMT. The time now is 09:29 PM.