Forex
Google
New signals service!

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course > Questions


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
  #21 (permalink)  
Old 06-16-2008, 07:09 PM
TheRumpledOne's Avatar
Banned
 
Join Date: Nov 2006
Posts: 806
TheRumpledOne is an unknown quantity at this point
Now that the results are in, it begs the question... HOW and WHEN DOES MT4 MOVE THE DATA IN THE BUFFERS?

Does anyone know the MT4 internals or where to read about them?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #22 (permalink)  
Old 06-16-2008, 07:21 PM
TheRumpledOne's Avatar
Banned
 
Join Date: Nov 2006
Posts: 806
TheRumpledOne is an unknown quantity at this point
Attachment 63594

Attachment 63595

Attachment 63596

Ok, the plot thickens...

Code:
int start() 
  {  
   int limit; 
   int counted_bars=IndicatorCounted();   
   
   
  if(counted_bars<0) return(-1);   // YOU CAN ACTIVATE THIS ONE
   
  if(counted_bars>0) counted_bars--; 
  limit=Bars-counted_bars; 

if( limit >= my.stop ) 
{
       for(int i=limit; i>=0; i--)  
       { 
       //  LOAD BUFFERS  
       
     TestBuffer[i] = limit ;

        } //for      

} // if( limit >= my.stop ) 

Comment( "Limit=", limit, "\n",
         "counted_bars=", counted_bars, "\n",
         "Bars=", Bars, "\n",   
         "my.stop=", my.stop, "\n",                          
         " ") ;

   return(0); 
  }
The input my.stop

extern int my.stop = 3 ;

is set to 3.

So the loop should not execute if limit is less than 3.

The current buffer, TestBuffer[0], has not been assigned a value so... where's it coming from?

There's something I need to learn about MT4!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #23 (permalink)  
Old 06-16-2008, 07:26 PM
TheRumpledOne's Avatar
Banned
 
Join Date: Nov 2006
Posts: 806
TheRumpledOne is an unknown quantity at this point
bool SetIndexBuffer( int index, doublearray[]) Binds the array variable declared at a global level to the custom indicator pre-defined buffer.

Maybe the keyword is BINDS!

More testing....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #24 (permalink)  
Old 06-16-2008, 07:31 PM
TheRumpledOne's Avatar
Banned
 
Join Date: Nov 2006
Posts: 806
TheRumpledOne is an unknown quantity at this point
Load the attached code on a M1 chart and watch.

Interesting...
Attached Files
File Type: mq4 I10_TRO_Limit_test.mq4 (2.8 KB, 5 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

BB 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
THE BUY ZONE - TheRumpledOne TheRumpledOne Indicators - Metatrader 4 253 08-24-2008 03:02 PM
TheRumpledOne Indicators TheRumpledOne Commercial Trading Systems and indicators 163 07-23-2008 09:25 AM


All times are GMT. The time now is 05:29 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.