Forex



Go Back   Forex Trading > Programming > MetaTrader
Forex Forum Register More recent Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 11-01-2008, 08:26 PM
Junior Member
 
Join Date: Jan 2008
Posts: 9
mcertini is on a distinguished road
Indicator Will Not Display Array Numbers.

Can someone help me? I have put together an indicator that uses various arrays. I have confirmed that my arrays are populated. But when I try to display my final array elements, I do not get anything? Can someone help me with the arraycopy function? This is where the problem resides.
Attached Files
File Type: mq4 Volume Oscillator.mq4 (2.1 KB, 20 views)
File Type: ex4 Volume Oscillator.ex4 (2.8 KB, 7 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 11-01-2008, 10:02 PM
cockeyedcowboy's Avatar
Senior Member
 
Join Date: Nov 2005
Posts: 486
cockeyedcowboy is on a distinguished road
Quote:
Originally Posted by mcertini View Post
Can someone help me? I have put together an indicator that uses various arrays. I have confirmed that my arrays are populated. But when I try to display my final array elements, I do not get anything? Can someone help me with the arraycopy function? This is where the problem resides.

Tried to explain this before, you can elimiate the need for the arraycopy() function if you just place the data directly into the end buffer as in;

Code:
 
 
// instead of 
 
    Indicator[ i ]  =  FastMA[ i ] / SlowMA[ i ];
 
// use
 
    Buf_0[ i ]  =  FastMA[ i ] / SlowMA[ i ];
there are other errors in your code as well as theres a problem with the MQ arraycopy function as it cannot transfer data between series arrays.


I will posts a rewrite of your code in an hour or so.

Keit
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 11-01-2008, 10:13 PM
Senior Member
 
Join Date: Feb 2006
Posts: 587
Michel is on a distinguished road
Quote:
Originally Posted by mcertini View Post
Can someone help me? I have put together an indicator that uses various arrays. I have confirmed that my arrays are populated. But when I try to display my final array elements, I do not get anything? Can someone help me with the arraycopy function? This is where the problem resides.
the size of the arrays is wrong if you have more than 500 bars
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #4 (permalink)  
Old 11-01-2008, 11:44 PM
cockeyedcowboy's Avatar
Senior Member
 
Join Date: Nov 2005
Posts: 486
cockeyedcowboy is on a distinguished road
mcertini

I kind of got carried away . The attached code should do what you want, I have not run it they may be some errors. Let me know if there are I will fix them.

Keit
Attached Files
File Type: mq4 EOM Volume[100].mq4 (11.7 KB, 14 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #5 (permalink)  
Old 11-02-2008, 12:13 AM
Junior Member
 
Join Date: Jan 2008
Posts: 9
mcertini is on a distinguished road
Array Problem.

Cockeyedcowboy,

Thank you for your explanation. I will go directly to the indicator line instead of to another array.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #6 (permalink)  
Old 11-02-2008, 12:53 AM
Junior Member
 
Join Date: Jan 2008
Posts: 9
mcertini is on a distinguished road
Array Problem Continues.

Cockeyedcowboy,

I tried your initial solution but it did not work. I have tried my previous solution and get a wierd number for the first element in my array. I have attached a printscreen of the alert results. I have also included my program.
Attached Files
File Type: mq4 Volume Oscillator.mq4 (2.1 KB, 8 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #7 (permalink)  
Old 11-02-2008, 01:07 AM
Junior Member
 
Join Date: Jan 2008
Posts: 9
mcertini is on a distinguished road
Array Problems Continue.

cockeyedcowboy,

I made the change you initially recommended. Though this does not work. After looking into the array, I note that there is an unusual number in the first position of my indicator array. I do not know how this number is getting into this position. Attached is a printscreen of an alert with the number. I have also attached my program.
Attached Files
File Type: mq4 Volume Oscillator.mq4 (2.1 KB, 6 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #8 (permalink)  
Old 11-02-2008, 11:11 AM
cockeyedcowboy's Avatar
Senior Member
 
Join Date: Nov 2005
Posts: 486
cockeyedcowboy is on a distinguished road
Quote:
Originally Posted by mcertini View Post
cockeyedcowboy,

I made the change you initially recommended. Though this does not work. After looking into the array, I note that there is an unusual number in the first position of my indicator array. I do not know how this number is getting into this position. Attached is a printscreen of an alert with the number. I have also attached my program.

mcertini

There are other errors in your code that needed to be corrected as well as changing one line of code.

compair this code with yours to see the other changes that are made and try to find out were your mistakes are.

and please if your asking people to look at your code add plenty of white space so it is more easily readable, it does not cost anything.


Keit
Attached Files
File Type: mq4 Volume%20Oscillator[1].mq4 (1.7 KB, 12 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #9 (permalink)  
Old 11-02-2008, 03:25 PM
Junior Member
 
Join Date: Jan 2008
Posts: 9
mcertini is on a distinguished road
Array Solution.

cockeyedcowboy,

I finally found the array problem. The below code did not an appropriate shift in the formula. I have now changed this so that it reflects "i".

FastMA[ i ] = iMAOnArray( vol, 0, 14, 0, MODE_SMA, i );
SlowMA[ i ] = iMAOnArray( vol, 0, 21, 0, MODE_SMA, i );

Thank you for your help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #10 (permalink)  
Old 11-02-2008, 10:45 PM
cockeyedcowboy's Avatar
Senior Member
 
Join Date: Nov 2005
Posts: 486
cockeyedcowboy is on a distinguished road
your right I over look that too
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Needed To Change Indicator Display MMRPS Digital Filters 5 01-03-2008 10:42 AM
looking for Price Display Indicator hoosain Indicators - Metatrader 4 9 12-11-2007 05:01 PM
indicator won't display ace Indicators - Metatrader 4 2 11-13-2007 04:06 AM
Indicator that can display value of close at 23 GMT 1Dave7 Indicators - Metatrader 4 0 08-16-2007 01:12 AM
Indicator Setup Display on indicator window iscuba11 General Discussion 1 07-31-2006 06:40 AM


All times are GMT. The time now is 02:11 AM.



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