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.
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.
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.
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
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.
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.
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.
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.