- Requests & Ideas
- Elite indicators :)
- Indicators with alerts/signal
There are no coders doing anything for you. There are no slaves here.
Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your difficulty. How To Ask Questions The Smart Way. (2004)
Prune pointless queries.
You have only four choices:
-
Search for it (CodeBase or Market). Do you expect us to do your research for you?
- Try asking at:
- Coding help - MQL4 programming forum
- Make It No Repaint Please! - MQL4 programming forum
- MT4 to MT5 code converter - MQL5 programming forum
- Please fix this indicator or EA - General - MQL5 programming forum
- Requests & Ideas (MQL5 only!) - Expert Advisors and Automated Trading - MQL5 programming forum
- Indicator to EA Free Service - General - MQL5 programming forum
- I will write an advisor free of charge - Expert Advisors and Automated Trading - MQL5 programming forum
- I will write you an advisor for free - Trading Systems - MQL5 programming forum
- I will write the indicator for free - MQL4 programming forum
-
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)
We're not going to code it for you (although it could happen if you are lucky or the problem is interesting.) We are willing to help you when you post your attempt (using CODE button) and state the nature of your problem.
No free help (2017)
Is there anything else we can do for you besides correcting the arrow and setting alerts?
Please show us your attempts and if you don't want to learn how to code, place an order in the Freelance section where for a small fee you will get a professional job.
I know you're asking nicely and you say you have no money, but both of those things don't stop you from learning to code and at least trying to do it yourself. There is a big difference between helping you with your attempts and you directly asking us to do the work for you.
I don't mean to argue with you, just to make you think.
Is there anything else we can do for you besides correcting the arrow and setting alerts?
Please show us your attempts and if you don't want to learn how to code, place an order in the Freelance section where for a small fee you will get a professional job.
I know you're asking nicely and you say you have no money, but both of those things don't stop you from learning to code and at least trying to do it yourself. There is a big difference between helping you with your attempts and you directly asking us to do the work for you.
I don't mean to argue with you, just to make you think.
Learn programming.
Add the necessary modifications:
// Global variables int prevTrend = 0; input int ItPeriod = 14; // iTrend period input ENUM_APPLIED_PRICE ItPrice = PRICE_CLOSE; // Price input int LevelBars = 300; // Look back period for levels input double LevelFactor = 0.283; // Levels factor input string InpSoundName = "alert.wav"; // Sound Name input uchar InpSoundRepetitions = 3; // Repetitions input uchar InpSoundPause = 3; // Pause, in seconds input bool InpUseSound = false; // Use Sound Alert input bool InpUseAlert = false; // Use Notification Alert datetime m_last_sound = 0; // "0" -> D'1970.01.01 00:00'; string m_text = ""; // double itrend[],itrendc[],lup[],ldn[],fillu[],filluz[],filld[],filldz[]; int arrowDistance = 0;
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[]) { if (Bars(_Symbol, _Period) < rates_total) return (-1); for (int i = (int)MathMax(prev_calculated - 1, 0); i < rates_total && !IsStopped(); i++) { double ma = getPrice(ItPrice,open,close,high,low,i,rates_total); double mv = iAdxvma(ma,ItPeriod,i,rates_total,0); fillu[i] = (ma - mv); lup[i] = fillu[i]; filluz[i] = 0; filld[i] = (-(low[i]+high[i]-2*mv)); ldn[i] = filld[i]; filldz[i] = 0; double hi = MathMax(fillu[i],filld[i]); for (int k=1; k<LevelBars && (i-k)>=0; k++) hi = MathMax(hi,MathMax(fillu[i-k],filld[i-k])); itrend[i] = hi*LevelFactor; itrendc[i] = (fillu[i]>itrend[i]) ? 1 : (filld[i]>itrend[i]) ? 2 : (i>0) ? itrendc[i-1] : 0; if (_Period == PERIOD_M1) { arrowDistance = 80.0; // Change the distance for the 1-minute timeframe } else if (_Period == PERIOD_M2) { arrowDistance = 80.0; // Change the distance for the 2-minute timeframe } else if (_Period == PERIOD_M5) { arrowDistance = 80.0; // Change the distance for the 5-minute timeframe } else if (_Period == PERIOD_M15) { arrowDistance = 160.0; // Change the distance for the 15-minute timeframe } else if (_Period == PERIOD_M30) { arrowDistance = 160.0; // Change the distance for the 30-minute timeframe } else if (_Period == PERIOD_H1) { arrowDistance = 160.0; // Change the distance for the 1-hour timeframe } else if (_Period == PERIOD_H4) { arrowDistance = 160.0; // Change the distance for the 4-hour timeframe } else if (_Period == PERIOD_D1) { arrowDistance = 160.0; // Change the distance for the daily timeframe } else if (_Period == PERIOD_W1) { arrowDistance = 160.0; // Change the distance for the weekly timeframe } else if (_Period == PERIOD_MN1) { arrowDistance = 160.0; // Change the distance for the monthly timeframe } if (itrendc[i] == 1 && prevTrend != 1) { // Up trend and trend changed from down to up prevTrend = 1; // Create arrow object for buy signal string upArrow = "Buy signal_" + IntegerToString(i); double bullArrowPrice = low[i] - (arrowDistance * _Point); ObjectCreate(0, upArrow, OBJ_ARROW, 0, time[i], bullArrowPrice); ObjectSetInteger(0, upArrow, OBJPROP_ARROWCODE, 233); ObjectSetInteger(0, upArrow, OBJPROP_BACK, false); ObjectSetInteger(0, upArrow, OBJPROP_COLOR, clrSilver); ObjectSetInteger(0, upArrow, OBJPROP_ANCHOR, ANCHOR_BOTTOM); ObjectSetInteger(0, upArrow, OBJPROP_WIDTH, 2); datetime time_current = TimeCurrent(); if ((int(time_current) - int(m_last_sound)) > InpSoundPause) { if (InpUseSound) PlaySound(InpSoundName); m_text = Symbol() + "," + StringSubstr(EnumToString(Period()), 7, -1) + " Trend up"; if (InpUseAlert) Alert(m_text); m_last_sound = time_current; } } else if (itrendc[i] == 2 && prevTrend != 2) { // Down trend and trend changed from up to down prevTrend = 2; // Create arrow object for sell signal string downArrow = "Sell signal_" + IntegerToString(i); double bearArrowPrice = high[i] + (arrowDistance * _Point); ObjectCreate(0, downArrow, OBJ_ARROW, 0, time[i], bearArrowPrice); ObjectSetInteger(0, downArrow, OBJPROP_ARROWCODE, 234); ObjectSetInteger(0, downArrow, OBJPROP_BACK, false); ObjectSetInteger(0, downArrow, OBJPROP_COLOR, clrSilver); ObjectSetInteger(0, downArrow, OBJPROP_ANCHOR, ANCHOR_TOP); ObjectSetInteger(0, downArrow, OBJPROP_WIDTH, 2); datetime time_current = TimeCurrent(); if ((int(time_current) - int(m_last_sound)) > InpSoundPause) { if (InpUseSound) PlaySound(InpSoundName); m_text = Symbol() + "," + StringSubstr(EnumToString(Period()), 7, -1) + " Trend down"; if (InpUseAlert) Alert(m_text); m_last_sound = time_current; } } } return (rates_total); }
void OnDeinit(const int reason) { ObjectsDeleteAll(0, "Buy signal_"); ObjectsDeleteAll(0, "Sell signal_"); }there are yet better and arguably more efficient ways of programming the arrow signals, but I'm not going there

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use