What MT4 build is using your friend ?
Are you using "extern" or "input" keyword for your parameters ?
What MT4 build is using your friend ?
Are you using "extern" or "input" keyword for your parameters ?
Hi Alain
I'm using input .
Is there any difference?
Sorry ,I asked for build , but as we are connected via internet I have to wait for his answer.
would you please help me with this also:
my indicator is not drowning any line or object and just make comment and alert .
when I remove my indicator from the chart, comments are not removing.
what should I do to remove comments bye removing the indicator ?
Hi Alain
I'm using input .
Is there any difference?
Sorry ,I asked for build , but as we are connected via internet I have to wait for his answer.
would you please help me with this also:
my indicator is not drowning any line or object and just make comment and alert .
when I remove my indicator from the chart, comments are not removing.
what should I do to remove comments bye removing the indicator ?
Hi,
Please show us your code.
To remove Comment, at this time I just use this, maybe expert coder here can help more easy :)
//+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { Comment(""); }
Hi,
Please show us your code.
To remove Comment, at this time I just use this, maybe expert coder here can help more easy :)
thanks Yohana.
its very simple and I afraid if I wrote it very ugly :D
indicator target is , when the price is in some price Zone, if volume was more than volume of 2 min ago , just make an alert.
problems :
1. inputs // I'm waiting for my friend (user) answer yet and maybe problem solved.
2.unlimited alerts until the next bar
//+------------------------------------------------------------------+ //| Seyed_Volume.mq4 | //| Copyright 2017, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2017, MetaQuotes Software Corp." #property link "https://www.mql5.com" #property version "1.00" #property strict #property indicator_chart_window extern double Price_Max=0.0001; //After Alain Verleyen told about input and extern, I changed it to extern extern double Price_Min=0.0; //After Alain Verleyen told about input and extern, I changed it to extern //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- indicator buffers mapping //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { //--- bool Price_Zone=false; if(Bid>=Price_Min && Bid<=Price_Max) { Price_Zone=true; } datetime lastbar;// In the other topic I asked about to stop repeating the alert and you ,"yohana" me to made these linesbut its not workingand I think I didnt //understand well bool alert_done=false; //--check once at every new bar if(lastbar!=Time[0]) { alert_done=false; //-- lastbar=Time[0]; }//-- end lastbar long Prev_Vol=iVolume(NULL,PERIOD_M1,2); long This_Vol=iVolume(NULL,PERIOD_M1,0); Comment("Max_Price :",Price_Max,"\nMin_Price :",Price_Min,"\nIs it in Price Zone : ",Price_Zone,"\nVolume : ",This_Vol,"\nVolume of 2 Bars befor ; ",Prev_Vol); if(Price_Zone) { if(!alert_done && This_Vol>Prev_Vol) { Alert("Alert"); alert_done=true; } } return(rates_total); } //+------------------------------------------------------------------+ //| Timer function | //+------------------------------------------------------------------+ void OnTimer() { //--- } //+------------------------------------------------------------------+//+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) // good Idea and works for me THANKS YOHANA { Comment(""); }
thanks Yohana.
but as you told its for experts , I'm working on an indicator .
its very simple and I afraid if I wrote it very ugly :D
indicator target is , when the price is in some price Zone, if volume was more than volume of 2 min ago , just make an alert.
problems :
1. inputs // I'm waiting for my friend (user) answer yet and maybe problem solved.
2.unlimited alerts until the next bar
3. removing comments after removing the indicator
Hi Reza,
Please don't write the variables inside the main loop :)
please remove your variables declaration to above like this:
//+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //--do something... Comment(""); //-------- return(0); }
What MT4 build is using your friend ?
Are you using "extern" or "input" keyword for your parameters ?
Build is 1090
Hi Reza,
Please don't write the variables inside the main loop :)
please remove your variables declaration to above like this:
Perfect !
Thank you very much Yohana Parmi.
now its just make alert once in a candle :D
just the problem with inputs are not solved
Build is 1090
Perfect !
Thank you very much Yohana Parmi.
now its just make alert once in a candle :D
Yes, Reza.. you're welcome (^̮^)
Perfect !
Thank you very much Yohana Parmi.
now its just make alert once in a candle :D
just the problem with inputs are not solved
Build is 1090
It seems that's an MT4 build 1090 bug. Try it again, compile the last version and send him.
thanks Alain , I sent the .mq4 file this time and problem solved.
thans for your helps :)

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hi
I wrote a simple indicator and sent it to my friend , but when he drags it to chart in the first upcoming window he doesn't have inputs tab,
also he has the same problem with other MT4s
I tried to use it in different MT4s and it works for me without problem on all of them.
here is the screen shot of my friend mt4 :
what should we do ?
Not : I give him just ex4 file without mq4 file.