My desired changes:
1) only concerned with Current Bar Tick Data.
2) no high/low lines and no previous bars.
3) Current Bar makes new high or new low then audio alert,
a) different short/quick audio alert for new high and new low,
b) new high alert can be turned off/on,
c) new low alert can be turned off/on.
4) Continuous example: Audio alert triggers for new high only once,
then next audio alert when new low only once,
until next new high alert goes off.
5) Place a small up arrow (lime) above price bar for a new high and
place a small down arrow (red) below price bar for a new low.
6) Could like a week of arrow history always show on chart even
after program has been closed?
7) Please provide source code for possible additional alert parameters at a later date.
Thanks, Mark
//+------------------------------------------------------------------+
//| RecentHighLowAlert.mq5 |
//+------------------------------------------------------------------+
#property version "1.01"
#property description "Draws lines on the High/Low of the recent N bars."
#property description "Alerts when the Bid price of the current bar crosses previous High/Low."
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_plots 2
#property indicator_color1 clrDodgerBlue
#property indicator_type1 DRAW_LINE
#property indicator_label1 "High"
#property indicator_color2 clrYellow
#property indicator_type2 DRAW_LINE
#property indicator_label2 "Low"
#define HIGH 1
#define LOW 0
enum enum_candle_to_check
{
Current,
Previous
};
input int N = 20;
input bool EnableNativeAlerts = false;
input bool EnableEmailAlerts = false;
input bool EnablePushAlerts = false;
input enum_candle_to_check TriggerCandle = Previous;
double HighBuf[];
double LowBuf[];
datetime LastHighAlert = D'1970.01.01';
datetime LastLowAlert = D'1970.01.01';
void OnInit()
{
PlotIndexSetInteger(0, PLOT_DRAW_BEGIN, N);
PlotIndexSetInteger(1, PLOT_DRAW_BEGIN, N);
SetIndexBuffer(0, HighBuf, INDICATOR_DATA);
SetIndexBuffer(1, LowBuf, INDICATOR_DATA);
}
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 (rates_total <= N) return 0;
// Skip calculated bars
int start = prev_calculated - 1;
// First run
if (start < N) start = N;
for (int i = start; i < rates_total; i++)
{
HighBuf[i] = High[ArrayMaximum(High, i - N + 1, N)];
LowBuf[i] = Low[ArrayMinimum(Low, i - N + 1, N)];
}
double Bid = SymbolInfoDouble(_Symbol, SYMBOL_BID);
if ((Bid > HighBuf[rates_total - 1 - TriggerCandle]) && (LastHighAlert != Time[rates_total - 1])) SendAlert(HIGH, HighBuf[rates_total - 1 - TriggerCandle], Time[rates_total - 1]);
else if ((Bid < LowBuf[rates_total - 1 - TriggerCandle]) && (LastLowAlert != Time[rates_total - 1])) SendAlert(LOW, LowBuf[rates_total - 1 - TriggerCandle], Time[rates_total - 1]);
return rates_total;
}
//+------------------------------------------------------------------+
//| Issues alerts and remembers the last sent alert time. |
//+------------------------------------------------------------------+
void SendAlert(int direction, double price, datetime time)
{
string alert = "Local ";
string subject;
if (direction == HIGH)
{
alert = alert + "high";
subject = "High broken @ " + Symbol() + " - " + StringSubstr(EnumToString((ENUM_TIMEFRAMES)Period()), 7);
LastHighAlert = time;
}
else if (direction == LOW)
{
alert = alert + "low";
subject = "Low broken @ " + Symbol() + " - " + StringSubstr(EnumToString((ENUM_TIMEFRAMES)Period()), 7);
LastLowAlert = time;
}
alert = alert + " broken at " + DoubleToString(price, _Digits) + ".";
if (EnableNativeAlerts) Alert(alert);
if (EnableEmailAlerts) SendMail(subject, TimeToString(TimeCurrent(), TIME_DATE | TIME_SECONDS) + " " + alert);
if (EnablePushAlerts) SendNotification(subject + " @ " + DoubleToString(price, _Digits));
}
//+------------------------------------------------------------------+
Ordini simili
We can transform your ideas, trading methods, and strategies into a fully automated trading bot (Expert Advisor). If you want an EA for automated trading, we're here to build the perfect solution for you
I need a SnD EA. Prefer coder who has previous experience coding SnD EA. PO are based on (CHoCH or BoS) and 3EMA, order block (from my TradingView indicator), premium-discount area. SL options are based on fix pips or zone size; CL is based on candle closing. TP1 and TP2 options are based on fix pips or fix ratio. Canceling PO is based on market structure. Money management are based on fix volume or fix amount or fix
Hi MQL5 Community, With over 10 years of live market experience as a Quantitative & Trading System Developer, I specialize in building robust, highly scalable Expert Advisors (EAs), custom indicators, and automated architectures. I’ve recently put together a comprehensive showcase demonstrating my flagship Modular Multi-Engine Architecture , designed to bring institutional-grade logic and real-time telemetry into
I need a developer that can make my trading strategies into a working perfect EA Robot working on Mt5. Candlestick pattern confirmation through PDH, PDL, PWH, PWL, Liquidities, HTF OB
I need a trading bot specially for XAU, high profit gain. Requirements bot analyzes the market places trades closes with 2 to 3 profit per trades daily profit should be 50 to 100 dollars
Привіт. Шукаю когось, хто б застосував мій код як бота . Я торгую індексом Aus_200 SFE (не XJO). Бот базується на MACD входу/виходу, RSI, стохастиці та vwap. Як тільки роботу приймуть, мені потрібно внести кілька коректив; однак, нічого суттєвого. Дякую
Custom MT5 EA for buy stop and sell stop breakout strategy.’ ‘Requirements, develop a custom Expert Advisor for MetaTrader 5 that places buy-stop and sell-stop pending orders based on defined breakout rules.’ ‘All important values adjustable via inputs.’ ‘Includes stop loss, take profit, trailing stop, and configurable risk management.’ ‘One trade at a time, works on demo before live.’ Provide source code and
السلام عليكم ورحمة الله وبركاته، أبحث عن مبرمج MQL5 خبير ومتمكن جداً لتطوير روبوت تداول (Expert Advisor) محترف لمنصة MetaTrader 5 يعمل باستراتيجية هيدج محددة بصفقة واحدة فقط في كل اتجاه (1 Buy & 1 Sell Max) مع إدارة مخاطر صارمة. المواصفات والاستراتيجية المطلوبة: 1. آلية الهيدج المحدود (Single Position Hedging Limit): الحد الأقصى للصفقات: يُسمح للروبوت بفتح صفقة شراء واحدة (1 Buy) وصفقة بيع واحدة (1 Sell) فقط كحد
A good trend predicting indicator is the one which can identify the trend change as soon as it happens on the chart. when a new candle is formed it should tell whether its going to go up or down. I have already seen a lot of repainting trend predictors so if your indicator is repainting then please don't bother contacting. I would like to see the demo version and then if satisfied , I would want the source code too
Looking for A verifiable, disciplined XAUUSD analyst with controlled drawdown, consistent stop-loss use, clear communication and the capacity to service a live community. To send daily London and New York signals exclusively in my channel on Telegram