-
Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
General rules and best pratices of the Forum. - General - MQL5 programming forum?
Next time, post in the correct place. The moderators will likely move this thread there soon. -
int init(){ ⋮ return(0); if (((TriggerCandle > 0) && (Time[0] > LastAlertTime)) || (TriggerCandle == 0)) { string Text; // Up Arrow Alert if ((ExtBuffer1[TriggerCandle] > 0) && ((TriggerCandle > 0) || ((TriggerCandle == 0) && (LastAlertDirection != 1)))) { Text = AlertText + "TSV UP" + Symbol() + " - " + EnumToString((ENUM_TIMEFRAMES)Period()) + " - Up."; if (EnableNativeAlerts) Alert(Text); if (EnableEmailAlerts) SendMail(AlertEmailSubject + "TSV ALERT", Text); if (EnableSoundAlerts) PlaySound(SoundFileName); if (EnablePushAlerts) SendNotification(Text); LastAlertTime = Time[0]; LastAlertDirection = 1; } // Down Arrow Alert if ((ExtBuffer2[TriggerCandle] > 0) && ((TriggerCandle > 0) || ((TriggerCandle == 0) && (LastAlertDirection != -1)))) { Text = AlertText + "TSV DOWN" + Symbol() + " - " + EnumToString((ENUM_TIMEFRAMES)Period()) + " - Down."; if (EnableNativeAlerts) Alert(Text); if (EnableEmailAlerts) SendMail(AlertEmailSubject + "TSV ALERT", Text); if (EnableSoundAlerts) PlaySound(SoundFileName); if (EnablePushAlerts) SendNotification(Text); LastAlertTime = Time[0]; LastAlertDirection = -1; } }
This code does nothing; already returned. Buffers have no values.
-
SetIndexBuffer(0,ExtBuffer0);SetIndexBuffer(1,ExtBuffer1);SetIndexBuffer(2,ExtBuffer2); SetIndexBuffer(1,Up);SetIndexBuffer(2,Down);SetIndexLabel(1,NULL);SetIndexLabel(2,NULL);
You assign index 1 (buffer № 2) to bother ExtBuffer1 and Up. Likewise № 2 and Down.
Sorry about it William, Its my first thread :)
After 3 years trading via TV, I want to build my way on MT4.
My knowledge is very limited and I still dont know how to refer to what you wrote
-
This code does nothing; already returned. Buffers have no values.
-
SetIndexBuffer(0,ExtBuffer0);SetIndexBuffer(1,ExtBuffer1);SetIndexBuffer(2,ExtBuffer2); SetIndexBuffer(1,Up);SetIndexBuffer(2,Down);SetIndexLabel(1,NULL);SetIndexLabel(2,NULL);
You assign index 1 (buffer № 2) to bother ExtBuffer1 and Up. Likewise № 2 and Down.
What you wrote is coding babel.
MT4: Learn to code it.
MT5: Begin learning to code it.
If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into your code.
or pay (Freelance) someone to code it. Top of every page is the link Freelance.
Hiring to write script - General - MQL5 programming forum 2019.08.21
Well you absolutely right, but I found this indicator for free online, its working great and I just wanted to add alerts.
Its my second day with the MT4, the script is very short with 30 lines, I thought you guys can help me because I just got started :)
I got your point about learning to code, I didnt had the chance yet :)
What you posted doesn't work at all. It can't. Stop lying.
What do you mean not working?
Well its working on my MT4 as you can see here -
https://prnt.sc/1j4ki73
Since Im 100% noob with MT4 I sent you the file that i was trying to code by my self, but since i dont know how to do it, the script may not run on your side.
I attached the original file as well.
If it helps, There is another similar version of this indicator that working with alerts, the only problem is that the one im using is much better for scalping.
Ill attach it as well.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Yo guys,
Can someone please help me fixing this short script, it seems the alerts not working and my head is exploding.
Thanks a million!