How to code? - page 339 1...332333334335336337338339340341342343344345346 New comment at120 2015.06.11 05:22 #3381 Hi apprentice coder! I have got a include file which use it, and the input for it is the "Close" from mql4. I don't now why the coder has done it this way... :-o Bye, AT I am searching indicators I NEED HELP. MACROSS, BlackBird ea Mladen Rakic 2015.06.11 11:10 #3382 Whenever you use price arrays they have to be declared like that (that is because mt is trying to prevent price changes by the code) at120 2015.06.15 14:21 #3383 Hi! How can I make the code to work with M5 and H1 data? So I need the display/data for MA(CD) of H1 and M5. So I took this code to get the values... But it dowsn't work, or better I don't get it... Any ideas? int h1shift = iBarShift(NULL,PERIOD_H1,iTime(NULL,PERIOD_M5,i),true); MACDH1=iMACD(NULL,PERIOD_H1,12,26,9,PRICE_CLOSE,MODE_SIGNAL,h1shift+1); Thanks for help! Bye, AT What techniques and methods take the chart's time Questions from Beginners MQL5 Mladen Rakic 2015.06.15 14:36 #3384 at120:Hi! How can I make the code to work with M5 and H1 data? So I need the display/data for MA(CD) of H1 and M5. So I took this code to get the values... But it dowsn't work, or better I don't get it... Any ideas? int h1shift = iBarShift(NULL,PERIOD_H1,iTime(NULL,PERIOD_M5,i),true); MACDH1=iMACD(NULL,PERIOD_H1,12,26,9,PRICE_CLOSE,MODE_SIGNAL,h1shift+1); [/PHP] Thanks for help! Bye, AT Try like this (it will display corresponding H1 data for the current chart) : [PHP] int h1shift = iBarShift(NULL,PERIOD_H1,Time); MACDH1=iMACD(NULL,PERIOD_H1,12,26,9,PRICE_CLOSE,MODE_SIGNAL,h1shift+1); If you want to use M5 data, then you have to do the same procedure for M5 time frame too - but it will not work correctly if your chart time frame is higher than M5 or H1 How to : Multi Trade nextbar 4TF Bars: Indicators and at120 2015.06.16 06:48 #3385 Hi Mladen! Again, thanks a lot for your answer and help! This code now is simpler and it works for me fine. Now I have an other problem with one of "my" subfunction... See the code, as output I get a zero... :-// and a warning from the compiler: "indicator buffer is less than needed" ?! Do you have any idea why? Thanks for your support! Bye, AT test.mq4 Files: test.mq4 2 kb MT4 Indicator - Same Compiler Warning "indicator buffers Please fix this indicator Mladen Rakic 2015.06.16 07:38 #3386 at120:Hi Mladen! Again, thanks a lot for your answer and help! This code now is simpler and it works for me fine. Now I have an other problem with one of "my" subfunction... See the code, as output I get a zero... :-// and a warning from the compiler: "indicator buffer is less than needed" ?! Do you have any idea why? Thanks for your support! Bye, AT test.mq4 Check it out now : _test.mq4 Files: _test.mq4 2 kb at120 2015.06.16 09:59 #3387 Hi Mladen! This one worked! ;-)) Thanks man! BTW, I have also an test_indi where I have the problem, it shows me sometimes two arrows on one bar. This shouldn't be. I just want one arrow on bar (either up or down arrow) and I want it not on actual bar, so I got this piece of code but I didn't got the right value?! What I'm doing wrong? Any idea? Thanks for your help! Bye, AT test_indi.mq4 Files: test_indi.mq4 2 kb Please Help me One How to mark with Arrow indicator Mladen Rakic 2015.06.16 10:14 #3388 at120:Hi Mladen! This one worked! ;-)) Thanks man! BTW, I have also an test_indi where I have the problem, it shows me sometimes two arrows on one bar. This shouldn't be. I just want one arrow on bar (either up or down arrow) and I want it not on actual bar, so I got this piece of code but I didn't got the right value?! What I'm doing wrong? Any idea? Thanks for your help! Bye, AT test_indi.mq4 Add these two lines right before the two if conditions you have in code : CrossUp = EMPTY_VALUE; CrossDown = EMPTY_VALUE; It should prevent what you are having at120 2015.06.16 10:32 #3389 Hi Mladen! Thanks for input! I have added these two lines, but without any success... See the picture... Maybe the problem restults from the fact, that the value is not in between the range? because range/limit is: +18 for e.g. buy and -50 for a sell... Bye, AT Files: test_indi.jpg 33 kb Create your own MetaTrader Indicators: Chandelier exit 4TF Bars: Indicators and at120 2015.06.17 06:18 #3390 Hi guys! An other "interessting" point is, that I have some indis with no vaule. When I use it on M5 (which is the indi for) I get no value, if I use it with H1, I get some values!? What I'm doing wrong? It's the same indi as test, the only thing I changed was the formular of IndicatorOutput (somthing like MACD1 * 23) Thanks for help and inputs! Bye, AT Indicators with alerts/signal W D Gann Indicators iCustom problems 1...332333334335336337338339340341342343344345346 New comment
Hi apprentice coder!
I have got a include file which use it, and the input for it is the "Close" from mql4.
I don't now why the coder has done it this way... :-o
Bye, AT
Whenever you use price arrays they have to be declared like that (that is because mt is trying to prevent price changes by the code)
Hi!
How can I make the code to work with M5 and H1 data? So I need the display/data for MA(CD) of H1 and M5. So
I took this code to get the values... But it dowsn't work, or better I don't get it...
Any ideas?
int h1shift = iBarShift(NULL,PERIOD_H1,iTime(NULL,PERIOD_M5,i),true);
MACDH1=iMACD(NULL,PERIOD_H1,12,26,9,PRICE_CLOSE,MODE_SIGNAL,h1shift+1);
Thanks for help!
Bye, AT
Hi!
How can I make the code to work with M5 and H1 data? So I need the display/data for MA(CD) of H1 and M5. So
I took this code to get the values... But it dowsn't work, or better I don't get it...
Any ideas?
int h1shift = iBarShift(NULL,PERIOD_H1,iTime(NULL,PERIOD_M5,i),true);
MACDH1=iMACD(NULL,PERIOD_H1,12,26,9,PRICE_CLOSE,MODE_SIGNAL,h1shift+1);
[/PHP]
Thanks for help!
Bye, ATTry like this (it will display corresponding H1 data for the current chart) :
[PHP] int h1shift = iBarShift(NULL,PERIOD_H1,Time);
MACDH1=iMACD(NULL,PERIOD_H1,12,26,9,PRICE_CLOSE,MODE_SIGNAL,h1shift+1);
If you want to use M5 data, then you have to do the same procedure for M5 time frame too - but it will not work correctly if your chart time frame is higher than M5 or H1
Hi Mladen!
Again, thanks a lot for your answer and help!
This code now is simpler and it works for me fine.
Now I have an other problem with one of "my" subfunction...
See the code, as output I get a zero... :-//
and a warning from the compiler: "indicator buffer is less than needed" ?!
Do you have any idea why?
Thanks for your support!
Bye, AT
test.mq4
Hi Mladen!
Again, thanks a lot for your answer and help!
This code now is simpler and it works for me fine.
Now I have an other problem with one of "my" subfunction...
See the code, as output I get a zero... :-//
and a warning from the compiler: "indicator buffer is less than needed" ?!
Do you have any idea why?
Thanks for your support!
Bye, AT
test.mq4Check it out now : _test.mq4
Hi Mladen!
This one worked! ;-)) Thanks man!
BTW, I have also an test_indi where I have the problem, it shows me sometimes two arrows on one bar.
This shouldn't be. I just want one arrow on bar (either up or down arrow) and I want it not on actual bar,
so I got this piece of code but I didn't got the right value?! What I'm doing wrong?
Any idea?
Thanks for your help!
Bye, AT
test_indi.mq4
Hi Mladen!
This one worked! ;-)) Thanks man!
BTW, I have also an test_indi where I have the problem, it shows me sometimes two arrows on one bar.
This shouldn't be. I just want one arrow on bar (either up or down arrow) and I want it not on actual bar,
so I got this piece of code but I didn't got the right value?! What I'm doing wrong?
Any idea?
Thanks for your help!
Bye, AT
test_indi.mq4Add these two lines right before the two if conditions you have in code :
CrossUp = EMPTY_VALUE;
CrossDown = EMPTY_VALUE;
It should prevent what you are having
Hi Mladen!
Thanks for input!
I have added these two lines, but without any success...
See the picture...
Maybe the problem restults from the fact, that the value is not in between the range?
because range/limit is: +18 for e.g. buy and -50 for a sell...
Bye, AT
Hi guys!
An other "interessting" point is, that I have some indis with no vaule.
When I use it on M5 (which is the indi for) I get no value, if I use it with H1,
I get some values!? What I'm doing wrong?
It's the same indi as test, the only thing I changed was the formular of IndicatorOutput (somthing like MACD1 * 23)
Thanks for help and inputs!
Bye, AT