Well, if you post the code, maybe someone may be able to help..
Best regards,
Hugh
Best regards,
Hugh
Well, if you post the code, maybe someone may be able to help..
Best regards,
Hugh
Best regards,
Hugh
//+------------------------------------------------------------------+ //| Macd Alert for 15 Min | //| Copyright © 2005, Haim & Yinon Corp. | //+------------------------------------------------------------------+ #property copyright "Copyright © 2005, Haim & Yinon Corp." #property link "" //define that this indicator will work in seperated window #property indicator_separate_window //define indicator minimum level (for the y value) #property indicator_minimum -1 //define indicator maximum level (for the y value) #property indicator_maximum 1 // how many buffers (lines/stars) will be shown #property indicator_buffers 4 #property indicator_color1 Green #property indicator_color2 Red //---- buffers extern int fast1 = 12; extern int slow1 = 26; extern int signal1 = 9; extern int fast2 = 6; extern int slow2 = 13; extern int signal2 = 4; double AlertLongBuffer[]; double AlertShortBuffer[]; double Lo; int up=0,dn=0; string short_name; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- set the buffers that will be shown IndicatorBuffers(4); SetIndexStyle(0,DRAW_ARROW); SetIndexBuffer(0,AlertLongBuffer); SetIndexStyle(1,DRAW_ARROW); SetIndexBuffer(1,AlertShortBuffer); IndicatorShortName(short_name); short_name="Alert 15Min "; return(0); } int start() { //run on all the bars and for each bar do : runHammer(Bars); isLong(0); isShort(0); return(0); } int runHammer(int total) { //run on all the bars and for each bar do : for (int i=total;i>=0;i--) { int sunnyResult=sunny(i); //reset the buffers AlertLongBuffer[i]=-2; AlertShortBuffer[i]=-2; if(sunnyResult==0) //long AlertLongBuffer[i]=0; if(sunnyResult==1) //short AlertShortBuffer[i]=0; } } double isLong(int i) { return (sunny(i)); } double isShort(int i) { return (sunny(i)); } int sunny(int i) { double macdslow = iMACD(Symbol(),15,fast1,slow1,signal1,PRICE_CLOSE,MODE_MAIN,i); double signalslow = iMACD(Symbol(),15,fast1,slow1,signal1,PRICE_CLOSE,MODE_SIGNAL,i); double macdfast = iMACD(Symbol(),15,fast2,slow2,signal2,PRICE_CLOSE,MODE_MAIN,i); double signalfast = iMACD(Symbol(),15,fast2,slow2,signal2,PRICE_CLOSE,MODE_SIGNAL,i); //check if its a long if(macdslow > -0.00030) if(macdslow > signalslow) if(macdfast > -0.00030) if(macdfast > signalfast) { return(0); } //check if its a short if(macdslow < 0.00030) if(macdslow < signalslow) if(macdfast < 0.00030) if(macdfast < signalfast) { return(1); } return(2); }
haim1w,
I believe you have to displace statements from
IndicatorShortName(short_name);
short_name="Alert 15Min ";
to
short_name="Alert 15Min ";
IndicatorShortName(short_name);
That's it.
I believe you have to displace statements from
IndicatorShortName(short_name);
short_name="Alert 15Min ";
to
short_name="Alert 15Min ";
IndicatorShortName(short_name);
That's it.
Hi again,
I have tried it, but it still doesn't work :-(
it show me the value -2.0000 twice.
Maybe other Idea???
Thanks any way
Haim
I have tried it, but it still doesn't work :-(
it show me the value -2.0000 twice.
Maybe other Idea???
Thanks any way
Haim
haim1w,
I believe you have to displace statements from
IndicatorShortName(short_name);
short_name="Alert 15Min ";
to
short_name="Alert 15Min ";
IndicatorShortName(short_name);
That's it.
I believe you have to displace statements from
IndicatorShortName(short_name);
short_name="Alert 15Min ";
to
short_name="Alert 15Min ";
IndicatorShortName(short_name);
That's it.
haim1w,
>I have tried it, but it still doesn't work :-(
it show me the value -2.0000 twice.
It's unlikely... Beware you've compiled your indicator properly. May be you need to drop it from the graph and create again (just to refresh)?
>Maybe other Idea???
No, you need not another idea, that does work fine:
short_name="Alert 15Min ";
IndicatorShortName(short_name);
Hope it helps.
>I have tried it, but it still doesn't work :-(
it show me the value -2.0000 twice.
It's unlikely... Beware you've compiled your indicator properly. May be you need to drop it from the graph and create again (just to refresh)?
>Maybe other Idea???
No, you need not another idea, that does work fine:
short_name="Alert 15Min ";
IndicatorShortName(short_name);
Hope it helps.
Thanks again online,
but for some reason it is still doesnt work for me.
I did compiled it and refresh it...
Haim
but for some reason it is still doesnt work for me.
I did compiled it and refresh it...
Haim
haim1w,
>I have tried it, but it still doesn't work :-(
it show me the value -2.0000 twice.
It's unlikely... Beware you've compiled your indicator properly. May be you need to drop it from the graph and create again (just to refresh)?
>Maybe other Idea???
No, you need not another idea, that does work fine:
short_name="Alert 15Min ";
IndicatorShortName(short_name);
Hope it helps.
>I have tried it, but it still doesn't work :-(
it show me the value -2.0000 twice.
It's unlikely... Beware you've compiled your indicator properly. May be you need to drop it from the graph and create again (just to refresh)?
>Maybe other Idea???
No, you need not another idea, that does work fine:
short_name="Alert 15Min ";
IndicatorShortName(short_name);
Hope it helps.
haim1w,
If it's so I can't help. Sorry.
If it's so I can't help. Sorry.
Thanks anyway...
Haim
Haim
haim1w,
If it's so I can't help. Sorry.
If it's so I can't help. Sorry.
Thanks again online,
but for some reason it is still doesnt work for me.
I did compiled it and refresh it...
but for some reason it is still doesnt work for me.
I did compiled it and refresh it...
It is my experience that compiling and refreshing my not be adequate.
Sometimes it is necessary to delete the Indicator and reinstall it.
Same goes for the Expert.
Thanks Again, i did it also...
with no luck
Haim
It is my experience that compiling and refreshing my not be adequate.
Sometimes it is necessary to delete the Indicator and reinstall it.
Same goes for the Expert.
with no luck
Haim
Thanks again online,
but for some reason it is still doesnt work for me.
I did compiled it and refresh it...
but for some reason it is still doesnt work for me.
I did compiled it and refresh it...
It is my experience that compiling and refreshing my not be adequate.
Sometimes it is necessary to delete the Indicator and reinstall it.
Same goes for the Expert.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I have made an indicator,
But in the indicator short name , i can see other numbers beside the one
i want.
Does anyone knows how to fix it ???
Thanks
Haim