I used Chat GPT 4 to create an MT4 indicator in 15min!

Поделиться
HTML-код
  • Опубликовано: 14 мар 2023
  • #chatgpt4 #metatrader4 #trading
    Here's how I created a custom MT4 indicator with the help of ChatGPT, a cutting-edge AI language model by OpenAI!
    In this tutorial, I'll guide you through my process of designing and coding an MT4 indicator tailored to your trading strategy. Regardless of your experience level, you'll learn how to use ChatGPT to simplify complex tasks and streamline your trading experience.
    Here's the code: www.dropbox.com/s/07iao5mj2w1...
    Don't forget to like, comment, and subscribe for more AI-assisted trading tutorials! Let's revolutionize the way we trade together. 🚀
    Corporate Analysis Clients include:
    ICE Exchange, CME Group, NADEX, TradeStation, CMC Markets, ADSS, OANDA, RJO Futures, ForexLive, Gain Capital, City Index, and ETX Capital.
    This broker-independent channel is for those of you who want to build real-world technical skills, iron-out any psychological kinks, gain consistency in your trading results, and experience measurable improvements in your trading. There is also room for folks to see how the markets truly operate, instead of peddling conspiracy theories.
    I am a multi-account trader, author, event-speaker, and private mentor for trading enthusiasts.
    Proudly associated with:
    Corporate Premium Content:
    Trade With Precision: tradewithprecision.com/our-co...
    My Charting Platform:
    ProRealTime: trading.prorealtime.com/en/pa...
    Mentoring: Please email me directly at adampeterharris@gmail.com
    Daily Chatroom:
    ForexVox: forexvox.echofin.com/signup
    Exclusive content: Fineco Bank: finecobank.co.uk/public/live-...
    Speaking events:
    Simon Campbell: roundtheclocktrader.com/
    The London Investors Show: www.londoninvestorshow.com/
    The London Trader Show: www.londontradershow.com/
    The IX Investor Show: www.ixinvestorshow.com/
    All information that is provided by Adam Harris is for educational/discourse purposes only.
    Investing in financial markets is risky and it is possible to lose money. It is recommended that you seek a professional licensed financial advisor prior to implementing any investment program or financial plan. Adam Harris and his employees, directors, presenters, contributors and representatives do not guarantee any results or investment returns based on the training and information that you receive. You acknowledge that Adam Harris and his employees and representatives have not promised you in any manner whatsoever that you will earn a profit from your personal investments or decisions based on the training and education provided.
    All material, logos & content is the property of Adam Harris and cannot be used for other purposes without explicit written permission.
    By accessing this presentation you hereby generally release Adam Harris and his employees and representatives from any liability whatsoever related to your related experiences.
    If you do not accept these terms, please cease attending this presentation/webinar/video and exit immediately.

Комментарии • 100

  • @javierherrera1010
    @javierherrera1010 10 месяцев назад +4

    It works, thank you.

  • @TA-MUSIIQUE
    @TA-MUSIIQUE 10 месяцев назад +1

    Great video, I was using that for Tradingview

  • @chrishall7258
    @chrishall7258 Год назад +1

    brilliant video thanks!

  • @TutorialTvOnline
    @TutorialTvOnline 6 месяцев назад

    Is there a way to create/receive alerts on the custom indicators created? Could you make a video about this pls

  • @frztrading
    @frztrading 11 месяцев назад +1

    Quite useful video!

  • @colinstagoll
    @colinstagoll Год назад +1

    Looks Good

  • @raffriff3914
    @raffriff3914 7 месяцев назад

    Hello, is there any alert indicator but for rsi or to use it in other windows that I have other indicators? It is not to use it in the main window that I have the Japanese candlesticks.

  • @rotato6644
    @rotato6644 Год назад +2

    Thanks for the video. Do any of you guys came to the issue where the code response got cut-off in between due to token limitations?

    • @AdamHarrisTrader
      @AdamHarrisTrader  9 месяцев назад

      Yes, I have that experience. Not so much lately, but it happened every time when I was doing this.

  • @niazemarkazi
    @niazemarkazi 5 месяцев назад

    excellent ! 👏

  • @sabirmohammad1604
    @sabirmohammad1604 8 месяцев назад +2

    Please tell what is the length of the 3 moving averages you have made on the chart.

    • @AdamHarrisTrader
      @AdamHarrisTrader  8 месяцев назад

      I use 10, 20 and 50. I use Simple, but they can be Exponential or any type. It makes minor differences and is really up to you.

  • @the-religiomakers
    @the-religiomakers 5 месяцев назад +2

    Please can we code a robot without using any analytical tool. I have formulated a 100% strategy, without any analytical indicator, which I would like to code. Thanks

  • @trendlab22024
    @trendlab22024 Год назад +2

    Nice, I might have to upgrade from the free version of GPT...

  • @hasanbasri9305
    @hasanbasri9305 Год назад +2

    Hello brother, does Chat JPT4 convert the PineScript TradingView indicator to mql4?

    • @AdamHarrisTrader
      @AdamHarrisTrader  Год назад +1

      Hello! I haven't tried this yet I'm afraid- when I do I'll let you know. It 'should' be possible.

  • @cgfan1084
    @cgfan1084 Год назад +2

    Hi Adam would you have the actual code from the video i could copy so i can copy and paste thanks.

    • @AdamHarrisTrader
      @AdamHarrisTrader  Год назад +3

      #property indicator_chart_window
      #property indicator_buffers 2
      #property indicator_color1 Green
      #property indicator_color2 Red
      #property indicator_width1 2
      #property indicator_width2 2
      double UpArrowBuffer[];
      double DownArrowBuffer[];
      int OnInit() {
      IndicatorBuffers(2);
      SetIndexStyle(0, DRAW_ARROW);
      SetIndexArrow(0, 241); // Up arrow symbol
      SetIndexBuffer(0, UpArrowBuffer);
      SetIndexEmptyValue(0, 0.0);
      SetIndexLabel(0, "Up Arrow");
      SetIndexStyle(1, DRAW_ARROW);
      SetIndexArrow(1, 242); // Down arrow symbol
      SetIndexBuffer(1, DownArrowBuffer);
      SetIndexEmptyValue(1, 0.0);
      SetIndexLabel(1, "Down Arrow");
      return (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[]) {
      int limit = rates_total - prev_calculated;
      int start = prev_calculated - 1;
      if (start < 1) {
      start = 1;
      }
      for (int i = start; i < rates_total; i++) {
      double ma10 = iMA(NULL, 0, 10, 0, MODE_SMA, PRICE_CLOSE, i);
      double ma20 = iMA(NULL, 0, 20, 0, MODE_SMA, PRICE_CLOSE, i);
      double ma50 = iMA(NULL, 0, 50, 0, MODE_SMA, PRICE_CLOSE, i);
      bool isInZone = (close[i] >= ma10 && close[i] ma50 && ma20 > ma50;
      bool isDowntrend = ma10 < ma50 && ma20 < ma50;
      bool isBullishCandle = close[i] > open[i];
      bool isBearishCandle = close[i] < open[i];
      if (isInZone && isUptrend && isBullishCandle) {
      UpArrowBuffer[i] = low[i] - 5 * Point;
      DownArrowBuffer[i] = 0.0;
      } else if (isInZone && isDowntrend && isBearishCandle) {
      UpArrowBuffer[i] = 0.0;
      DownArrowBuffer[i] = high[i] + 5 * Point;
      } else {
      UpArrowBuffer[i] = 0.0;
      DownArrowBuffer[i] = 0.0;
      }
      }
      return (rates_total);
      }

  • @arinnfc
    @arinnfc 5 месяцев назад +1

    what trading do you use? forex ? I use forex trading, and only joined the NFC forex community in early 2023.

  • @corpuschaos
    @corpuschaos 11 месяцев назад +2

    it was really cool but i cant create it myself..got lot of errors. maybe because im using chat gpt 3.5. if u dont mind can you share with us the indicator that u have made. it was really cool n ur awesome can create that

    • @AdamHarrisTrader
      @AdamHarrisTrader  9 месяцев назад +1

      I'll give you the code below, and you can compile it- shouldn't give you any issues:
      #property indicator_chart_window
      #property indicator_buffers 2
      #property indicator_color1 Green
      #property indicator_color2 Red
      #property indicator_width1 2
      #property indicator_width2 2
      double UpArrowBuffer[];
      double DownArrowBuffer[];
      int OnInit() {
      IndicatorBuffers(2);
      SetIndexStyle(0, DRAW_ARROW);
      SetIndexArrow(0, 241); // Up arrow symbol
      SetIndexBuffer(0, UpArrowBuffer);
      SetIndexEmptyValue(0, 0.0);
      SetIndexLabel(0, "Up Arrow");
      SetIndexStyle(1, DRAW_ARROW);
      SetIndexArrow(1, 242); // Down arrow symbol
      SetIndexBuffer(1, DownArrowBuffer);
      SetIndexEmptyValue(1, 0.0);
      SetIndexLabel(1, "Down Arrow");
      return (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[]) {
      int limit = rates_total - prev_calculated;
      int start = prev_calculated - 1;
      if (start < 1) {
      start = 1;
      }
      for (int i = start; i < rates_total; i++) {
      double ma10 = iMA(NULL, 0, 10, 0, MODE_SMA, PRICE_CLOSE, i);
      double ma20 = iMA(NULL, 0, 20, 0, MODE_SMA, PRICE_CLOSE, i);
      double ma50 = iMA(NULL, 0, 50, 0, MODE_SMA, PRICE_CLOSE, i);
      bool isInZone = (close[i] >= ma10 && close[i] ma50 && ma20 > ma50;
      bool isDowntrend = ma10 < ma50 && ma20 < ma50;
      bool isBullishCandle = close[i] > open[i];
      bool isBearishCandle = close[i] < open[i];
      if (isInZone && isUptrend && isBullishCandle) {
      UpArrowBuffer[i] = low[i] - 5 * Point;
      DownArrowBuffer[i] = 0.0;
      } else if (isInZone && isDowntrend && isBearishCandle) {
      UpArrowBuffer[i] = 0.0;
      DownArrowBuffer[i] = high[i] + 5 * Point;
      } else {
      UpArrowBuffer[i] = 0.0;
      DownArrowBuffer[i] = 0.0;
      }
      }
      return (rates_total);
      }

  • @wandatrades4809
    @wandatrades4809 Год назад +1

    Amazing that you didn't get any compilation errors. Could you please paste the prompt in the description or in the comments?

    • @sawhoe3
      @sawhoe3 Год назад +1

      @@AdamHarrisTrader I just stumbled across your video & seen this just in time . thanks !

    • @AdamHarrisTrader
      @AdamHarrisTrader  Год назад +4

      #property indicator_chart_window
      #property indicator_buffers 2
      #property indicator_color1 Green
      #property indicator_color2 Red
      #property indicator_width1 2
      #property indicator_width2 2
      double UpArrowBuffer[];
      double DownArrowBuffer[];
      int OnInit() {
      IndicatorBuffers(2);
      SetIndexStyle(0, DRAW_ARROW);
      SetIndexArrow(0, 241); // Up arrow symbol
      SetIndexBuffer(0, UpArrowBuffer);
      SetIndexEmptyValue(0, 0.0);
      SetIndexLabel(0, "Up Arrow");
      SetIndexStyle(1, DRAW_ARROW);
      SetIndexArrow(1, 242); // Down arrow symbol
      SetIndexBuffer(1, DownArrowBuffer);
      SetIndexEmptyValue(1, 0.0);
      SetIndexLabel(1, "Down Arrow");
      return (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[]) {
      int limit = rates_total - prev_calculated;
      int start = prev_calculated - 1;
      if (start < 1) {
      start = 1;
      }
      for (int i = start; i < rates_total; i++) {
      double ma10 = iMA(NULL, 0, 10, 0, MODE_SMA, PRICE_CLOSE, i);
      double ma20 = iMA(NULL, 0, 20, 0, MODE_SMA, PRICE_CLOSE, i);
      double ma50 = iMA(NULL, 0, 50, 0, MODE_SMA, PRICE_CLOSE, i);
      bool isInZone = (close[i] >= ma10 && close[i] ma50 && ma20 > ma50;
      bool isDowntrend = ma10 < ma50 && ma20 < ma50;
      bool isBullishCandle = close[i] > open[i];
      bool isBearishCandle = close[i] < open[i];
      if (isInZone && isUptrend && isBullishCandle) {
      UpArrowBuffer[i] = low[i] - 5 * Point;
      DownArrowBuffer[i] = 0.0;
      } else if (isInZone && isDowntrend && isBearishCandle) {
      UpArrowBuffer[i] = 0.0;
      DownArrowBuffer[i] = high[i] + 5 * Point;
      } else {
      UpArrowBuffer[i] = 0.0;
      DownArrowBuffer[i] = 0.0;
      }
      }
      return (rates_total);
      }

    • @michalforman4580
      @michalforman4580 Год назад

      ​@@AdamHarrisTrader
      Hey man i have try it but it always gives me like 18 errors.. What should i do please?

    • @kennytse8713
      @kennytse8713 Год назад

      @@michalforman4580 no error

    • @y.c.breddy3153
      @y.c.breddy3153 10 месяцев назад

      @@AdamHarrisTrader I was unable to copy the code

  • @elmerh3189
    @elmerh3189 4 месяца назад +3

    Do you think I can convert my mlq4 EA to a different format?

    • @AdamHarrisTrader
      @AdamHarrisTrader  4 месяца назад +1

      This is a good question- in short, yes, that should be possible as long as we know which language the other format uses. There might be a few bugs, but it should work.

  • @sebastianaguirre494
    @sebastianaguirre494 Год назад +1

    How I can get the indicator? I click on the dropbox link and it doesnt show up.

    • @AdamHarrisTrader
      @AdamHarrisTrader  Год назад

      I have posted the code in comments here, which you can then compile yourself- you shouldn't get any errors. Let me know.

    • @111111925
      @111111925 11 месяцев назад

      @@AdamHarrisTraderdropbox link not working

  • @madeathome6397
    @madeathome6397 Год назад +2

    Can you send us the code file?
    The download link is not working

    • @AdamHarrisTrader
      @AdamHarrisTrader  9 месяцев назад

      #property indicator_chart_window
      #property indicator_buffers 2
      #property indicator_color1 Green
      #property indicator_color2 Red
      #property indicator_width1 2
      #property indicator_width2 2
      double UpArrowBuffer[];
      double DownArrowBuffer[];
      int OnInit() {
      IndicatorBuffers(2);
      SetIndexStyle(0, DRAW_ARROW);
      SetIndexArrow(0, 241); // Up arrow symbol
      SetIndexBuffer(0, UpArrowBuffer);
      SetIndexEmptyValue(0, 0.0);
      SetIndexLabel(0, "Up Arrow");
      SetIndexStyle(1, DRAW_ARROW);
      SetIndexArrow(1, 242); // Down arrow symbol
      SetIndexBuffer(1, DownArrowBuffer);
      SetIndexEmptyValue(1, 0.0);
      SetIndexLabel(1, "Down Arrow");
      return (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[]) {
      int limit = rates_total - prev_calculated;
      int start = prev_calculated - 1;
      if (start < 1) {
      start = 1;
      }
      for (int i = start; i < rates_total; i++) {
      double ma10 = iMA(NULL, 0, 10, 0, MODE_SMA, PRICE_CLOSE, i);
      double ma20 = iMA(NULL, 0, 20, 0, MODE_SMA, PRICE_CLOSE, i);
      double ma50 = iMA(NULL, 0, 50, 0, MODE_SMA, PRICE_CLOSE, i);
      bool isInZone = (close[i] >= ma10 && close[i] ma50 && ma20 > ma50;
      bool isDowntrend = ma10 < ma50 && ma20 < ma50;
      bool isBullishCandle = close[i] > open[i];
      bool isBearishCandle = close[i] < open[i];
      if (isInZone && isUptrend && isBullishCandle) {
      UpArrowBuffer[i] = low[i] - 5 * Point;
      DownArrowBuffer[i] = 0.0;
      } else if (isInZone && isDowntrend && isBearishCandle) {
      UpArrowBuffer[i] = 0.0;
      DownArrowBuffer[i] = high[i] + 5 * Point;
      } else {
      UpArrowBuffer[i] = 0.0;
      DownArrowBuffer[i] = 0.0;
      }
      }
      return (rates_total);
      }

  • @njjjjjjjjhhhs
    @njjjjjjjjhhhs Год назад +1

    🙏

  • @forester1
    @forester1 8 месяцев назад +2

    Can you make mql5 script that send data from mql5 to server using websocket.

    • @AdamHarrisTrader
      @AdamHarrisTrader  8 месяцев назад +1

      I'll look into this for you.

    • @forester1
      @forester1 8 месяцев назад +1

      @@AdamHarrisTrader
      I make it that send to firebase . But i want to send through websocket

  • @rufdymond
    @rufdymond Год назад +5

    Not used GTP4 yet, but I have been using GTP3 for a few months and have used it to code a few EAs. Have to say, it does make some mistakes but as I’m a software dev they are quite easy to fix. I’m using GPT3 as a tool to make me more productive, but not as something to do all the work for me…..will be interesting to see how much better GPT4 is.

    • @AdamHarrisTrader
      @AdamHarrisTrader  Год назад +2

      It turns out this my success here was the first time I attempted to use GPT for coding, and it was a fluke. Since then, I've done a few other indicators, and am working on an expert advisor now, but I've had to debug.

    • @emmanuelifunanya5030
      @emmanuelifunanya5030 Год назад +1

      Can you share your code with me sir?

    • @wingchangwow
      @wingchangwow Год назад +1

      ​@@AdamHarrisTraderare you going to make a video on the ea?

    • @mrbrownwilliams652
      @mrbrownwilliams652 11 месяцев назад

      Crate indicate for Mt4 unit in search

    • @mrbrownwilliams652
      @mrbrownwilliams652 11 месяцев назад

      What language

  • @kelvinlee6273
    @kelvinlee6273 9 месяцев назад +1

    Could not open the link in dropbox

    • @AdamHarrisTrader
      @AdamHarrisTrader  9 месяцев назад

      Try this, please: www.dropbox.com/scl/fi/8a4mw0vbue3c8vr0s9963/TheZoneIndicator.mq4?rlkey=x4d4ay9ejymupkg59vn2qs8rz&dl=0

  • @y.c.breddy3153
    @y.c.breddy3153 Год назад +1

    File is not available at link could you please send me new link

    • @AdamHarrisTrader
      @AdamHarrisTrader  Год назад

      Did you find the code in the comments yet? I have posted it for a few people already. Let me know.

    • @y.c.breddy3153
      @y.c.breddy3153 Год назад

      @@AdamHarrisTrader is it pinescriots for Tradingview or MT4 code

  • @MD73695
    @MD73695 10 месяцев назад +2

    How accurate is this indicator?

    • @AdamHarrisTrader
      @AdamHarrisTrader  10 месяцев назад +1

      I would score it a 6/10 or 7/10. It definintely requires a layer of manual technical judgement by the trader.

  • @intel369
    @intel369 8 месяцев назад +11

    Please remove the background music. If you want to deliver a message, deliver a message. If you want to do a remix, do a remix. Don’t do both please.

    • @AdamHarrisTrader
      @AdamHarrisTrader  8 месяцев назад +4

      I so agree- I regret using music here, and have re-uploaded the same video WITHOUT the annoying music here:
      ruclips.net/video/qNby2koV9vA/видео.html

    • @3rdtwirl494
      @3rdtwirl494 8 месяцев назад

      Yes

  • @morwafx7516
    @morwafx7516 Год назад +1

    how do i access gpt 4?

    • @redadz8722
      @redadz8722 Год назад +1

      You will need to pay for a subscription USD 24 per month you will get gpt 4, gpt browers, gpt pluggings

    • @morwafx7516
      @morwafx7516 11 месяцев назад

      thanks@@redadz8722

  • @g-play1796
    @g-play1796 Год назад +3

    helllo,where can I get the code for mt4?, I write as it is in the video but it is not received, it shows me 16 errors

    • @AdamHarrisTrader
      @AdamHarrisTrader  Год назад +2

      Here it is: #property indicator_chart_window
      #property indicator_buffers 2
      #property indicator_color1 Green
      #property indicator_color2 Red
      #property indicator_width1 2
      #property indicator_width2 2
      double UpArrowBuffer[];
      double DownArrowBuffer[];
      int OnInit() {
      IndicatorBuffers(2);
      SetIndexStyle(0, DRAW_ARROW);
      SetIndexArrow(0, 241); // Up arrow symbol
      SetIndexBuffer(0, UpArrowBuffer);
      SetIndexEmptyValue(0, 0.0);
      SetIndexLabel(0, "Up Arrow");
      SetIndexStyle(1, DRAW_ARROW);
      SetIndexArrow(1, 242); // Down arrow symbol
      SetIndexBuffer(1, DownArrowBuffer);
      SetIndexEmptyValue(1, 0.0);
      SetIndexLabel(1, "Down Arrow");
      return (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[]) {
      int limit = rates_total - prev_calculated;
      int start = prev_calculated - 1;
      if (start < 1) {
      start = 1;
      }
      for (int i = start; i < rates_total; i++) {
      double ma10 = iMA(NULL, 0, 10, 0, MODE_SMA, PRICE_CLOSE, i);
      double ma20 = iMA(NULL, 0, 20, 0, MODE_SMA, PRICE_CLOSE, i);
      double ma50 = iMA(NULL, 0, 50, 0, MODE_SMA, PRICE_CLOSE, i);
      bool isInZone = (close[i] >= ma10 && close[i] ma50 && ma20 > ma50;
      bool isDowntrend = ma10 < ma50 && ma20 < ma50;
      bool isBullishCandle = close[i] > open[i];
      bool isBearishCandle = close[i] < open[i];
      if (isInZone && isUptrend && isBullishCandle) {
      UpArrowBuffer[i] = low[i] - 5 * Point;
      DownArrowBuffer[i] = 0.0;
      } else if (isInZone && isDowntrend && isBearishCandle) {
      UpArrowBuffer[i] = 0.0;
      DownArrowBuffer[i] = high[i] + 5 * Point;
      } else {
      UpArrowBuffer[i] = 0.0;
      DownArrowBuffer[i] = 0.0;
      }
      }
      return (rates_total);
      }

    • @g-play1796
      @g-play1796 Год назад +1

      @@AdamHarrisTrader thank you very much

    • @PeterPankowski
      @PeterPankowski Год назад +2

      The same problem I have.... many errors... NOT working like in the video

    • @AdamHarrisTrader
      @AdamHarrisTrader  Год назад +1

      #property indicator_chart_window
      #property indicator_buffers 2
      #property indicator_color1 Green
      #property indicator_color2 Red
      #property indicator_width1 2
      #property indicator_width2 2
      double UpArrowBuffer[];
      double DownArrowBuffer[];
      int OnInit() {
      IndicatorBuffers(2);
      SetIndexStyle(0, DRAW_ARROW);
      SetIndexArrow(0, 241); // Up arrow symbol
      SetIndexBuffer(0, UpArrowBuffer);
      SetIndexEmptyValue(0, 0.0);
      SetIndexLabel(0, "Up Arrow");
      SetIndexStyle(1, DRAW_ARROW);
      SetIndexArrow(1, 242); // Down arrow symbol
      SetIndexBuffer(1, DownArrowBuffer);
      SetIndexEmptyValue(1, 0.0);
      SetIndexLabel(1, "Down Arrow");
      return (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[]) {
      int limit = rates_total - prev_calculated;
      int start = prev_calculated - 1;
      if (start < 1) {
      start = 1;
      }
      for (int i = start; i < rates_total; i++) {
      double ma10 = iMA(NULL, 0, 10, 0, MODE_SMA, PRICE_CLOSE, i);
      double ma20 = iMA(NULL, 0, 20, 0, MODE_SMA, PRICE_CLOSE, i);
      double ma50 = iMA(NULL, 0, 50, 0, MODE_SMA, PRICE_CLOSE, i);
      bool isInZone = (close[i] >= ma10 && close[i] ma50 && ma20 > ma50;
      bool isDowntrend = ma10 < ma50 && ma20 < ma50;
      bool isBullishCandle = close[i] > open[i];
      bool isBearishCandle = close[i] < open[i];
      if (isInZone && isUptrend && isBullishCandle) {
      UpArrowBuffer[i] = low[i] - 5 * Point;
      DownArrowBuffer[i] = 0.0;
      } else if (isInZone && isDowntrend && isBearishCandle) {
      UpArrowBuffer[i] = 0.0;
      DownArrowBuffer[i] = high[i] + 5 * Point;
      } else {
      UpArrowBuffer[i] = 0.0;
      DownArrowBuffer[i] = 0.0;
      }
      }
      return (rates_total);
      }

  • @firstnamelastname6148
    @firstnamelastname6148 Год назад +1

    Hi adam. I would like to have bullish & bearish engulfing indicator with email alerts, push notification and popup notification.
    How to ask MT4 to come up with code? can you create the question for me and paste here?
    Any help is appreaciate im not englis speaker my code came with many error.

    • @firstnamelastname6148
      @firstnamelastname6148 Год назад

      MY QUESTION BELOW.
      i would like to create an indicator for MT4 that:
      1) Identifies second candle that completely 'engulfs' the real body of the first one, without regard to the length of the tail shadows.
      I want it to come with email alert, push notification and popup notification.
      my code that chatgpt came up with:
      #property indicator_chart_window
      #property indicator_buffers 2
      #property indicator_color1 Green
      #property indicator_color2 Red
      extern bool EnableAlerts = true;
      extern bool EnableEmail = true;
      extern bool EnableNotification = true;
      void send_alert(string message)
      {
      if (EnableAlerts) Alert(message);
      if (EnableEmail) SendMail(Symbol()+" Engulfing Alert", message);
      if (EnableNotification) SendNotification(message);
      }
      int OnInit()
      {
      IndicatorDigits(Digits + 1);
      return(INIT_SUCCEEDED);
      }
      void OnDeinit(const int reason)
      {
      Comment("");
      }
      void OnTick()
      {
      Comment("");
      }
      void OnCalculate(const int rates_total,
      const int prev_calculated,
      const double &open[],
      const double &high[],
      const double &low[],
      const double &close[],
      const long &tick_volume[],
      const long &volume[],
      const int &spread[])
      {
      int shift;
      bool bullish_engulfing, bearish_engulfing;
      for (shift = rates_total - 2; shift >= 0; shift--)
      {
      bullish_engulfing = (Close[shift] < Open[shift] && Close[shift + 1] > Open[shift + 1] && Close[shift] > Low[shift + 1] && Open[shift] < High[shift + 1]);
      bearish_engulfing = (Close[shift] > Open[shift] && Close[shift + 1] < Open[shift + 1] && Close[shift] < High[shift + 1] && Open[shift] > Low[shift + 1]);
      if (bullish_engulfing)
      {
      Buffer1[shift] = Low[shift + 1] - NormalizeDouble(SymbolInfoDouble(_Symbol, SYMBOL_POINT), Digits);
      Buffer2[shift] = EMPTY_VALUE;
      string message = "Bullish Engulfing pattern detected on " + Symbol() + " " + IntegerToString(Period()) + " at " + TimeToStr(Time[shift]) + ". Buy at " + DoubleToString(Low[shift + 1], Digits) + ".";
      send_alert(message);
      }
      else if (bearish_engulfing)
      {
      Buffer1[shift] = EMPTY_VALUE;
      Buffer2[shift] = High[shift + 1] + NormalizeDouble(SymbolInfoDouble(_Symbol, SYMBOL_POINT), Digits);
      string message = "Bearish Engulfing pattern detected on " + Symbol() + " " + IntegerToString(Period()) + " at " + TimeToStr(Time[shift]) + ". Sell at " + DoubleToString(High[shift + 1], Digits) + ".";
      send_alert(message);
      }
      else
      {
      Buffer1[shift] = EMPTY_VALUE;
      Buffer2[shift] = EMPTY_VALUE;
      }
      }
      }

    • @firstnamelastname6148
      @firstnamelastname6148 Год назад +1

      I don't know what error that i need to fix.

    • @wujosua
      @wujosua Год назад

      @@firstnamelastname6148 is your problem solved ?

    • @AdamHarrisTrader
      @AdamHarrisTrader  9 месяцев назад

      I'm going to see if I can get this created.

    • @firstnamelastname6148
      @firstnamelastname6148 9 месяцев назад

      @@wujosua no.

  • @azizyuldoshev2937
    @azizyuldoshev2937 Год назад

    Can you share it. Please

    • @AdamHarrisTrader
      @AdamHarrisTrader  Год назад +1

      Here it is: #property indicator_chart_window
      #property indicator_buffers 2
      #property indicator_color1 Green
      #property indicator_color2 Red
      #property indicator_width1 2
      #property indicator_width2 2
      double UpArrowBuffer[];
      double DownArrowBuffer[];
      int OnInit() {
      IndicatorBuffers(2);
      SetIndexStyle(0, DRAW_ARROW);
      SetIndexArrow(0, 241); // Up arrow symbol
      SetIndexBuffer(0, UpArrowBuffer);
      SetIndexEmptyValue(0, 0.0);
      SetIndexLabel(0, "Up Arrow");
      SetIndexStyle(1, DRAW_ARROW);
      SetIndexArrow(1, 242); // Down arrow symbol
      SetIndexBuffer(1, DownArrowBuffer);
      SetIndexEmptyValue(1, 0.0);
      SetIndexLabel(1, "Down Arrow");
      return (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[]) {
      int limit = rates_total - prev_calculated;
      int start = prev_calculated - 1;
      if (start < 1) {
      start = 1;
      }
      for (int i = start; i < rates_total; i++) {
      double ma10 = iMA(NULL, 0, 10, 0, MODE_SMA, PRICE_CLOSE, i);
      double ma20 = iMA(NULL, 0, 20, 0, MODE_SMA, PRICE_CLOSE, i);
      double ma50 = iMA(NULL, 0, 50, 0, MODE_SMA, PRICE_CLOSE, i);
      bool isInZone = (close[i] >= ma10 && close[i] ma50 && ma20 > ma50;
      bool isDowntrend = ma10 < ma50 && ma20 < ma50;
      bool isBullishCandle = close[i] > open[i];
      bool isBearishCandle = close[i] < open[i];
      if (isInZone && isUptrend && isBullishCandle) {
      UpArrowBuffer[i] = low[i] - 5 * Point;
      DownArrowBuffer[i] = 0.0;
      } else if (isInZone && isDowntrend && isBearishCandle) {
      UpArrowBuffer[i] = 0.0;
      DownArrowBuffer[i] = high[i] + 5 * Point;
      } else {
      UpArrowBuffer[i] = 0.0;
      DownArrowBuffer[i] = 0.0;
      }
      }
      return (rates_total);
      }

  • @zamamadikizela8025
    @zamamadikizela8025 8 месяцев назад

    Wait a minute, chatgbt can write a code for you?

  • @y.c.breddy3153
    @y.c.breddy3153 10 месяцев назад +1

    Code link not working

    • @AdamHarrisTrader
      @AdamHarrisTrader  10 месяцев назад

      Can you check other responses as I have pasted here several times. If you can’t find it, let me know and I’ll repaste it in your comment here. Thanks

  • @frankwood11
    @frankwood11 Год назад +1

    Why on earth have you got music playing?

    • @AdamHarrisTrader
      @AdamHarrisTrader  Год назад

      Well, now I'm embarassed :)
      I thought if the video doesn't have some mild background music as so many videos online do have these days, it would be boring. Did you find it distracting?

  • @ALUCIO-qf2ps
    @ALUCIO-qf2ps Год назад +1

    If someone will create chat that will make omly profits than MT4 and 5 will turn off possibility to use EA"s. They will not allow people not to play because there must be people to make moves on the markets.

  • @josedias9458
    @josedias9458 9 месяцев назад +1

    Adam, very nice video, i am very very old person, and i would like to ask you, if you could doit for me ,,,i would give you the indicator,, and i would be glad to pay you a fair price for your work. God Bless jose

    • @AdamHarrisTrader
      @AdamHarrisTrader  9 месяцев назад

      Please email me @adampeterharris@gmail.com and I'll try to assist you.

  • @stephensummers1958
    @stephensummers1958 Год назад +3

    I get sooooo many errors when doing this. :/

    • @AdamHarrisTrader
      @AdamHarrisTrader  Год назад +1

      I need to do a follow-up video to this one- it seems I had a fluke experience, but I think it was because it was such a simple request. As soon as I try to do more complex indicators, I get more compilation errors as well.

    • @stephensummers1958
      @stephensummers1958 Год назад

      @@AdamHarrisTrader I have done even simpler. I told it to place 2 SMAs on the chart, an orange 50 and a blue 20. It couldn't even do that. It would show the SMAs in the inputs but you could not see the 20 SMA on the chart. I even tried specifying that it was mql4 for MetaTrader build 1380 and it was still full of errors. Now sometimes you can tell it that line 23 has X error on it and it will try and fix it. 90% of the time it will not fix the error or it will come back with different or added errors. The other 10% of the time you can fix the errors but the indicator will come out wrong. Another thing I REALLY struggled with was getting arrows to appear on the chart that showed on historical data like yours or that needed to be confirmed on the current candle close. There are a few errors that were common to see pop up.

  • @TradingTheBias
    @TradingTheBias 9 месяцев назад +1

    Interesting video but no need for the music. It makes it hard to hear you.

    • @AdamHarrisTrader
      @AdamHarrisTrader  9 месяцев назад

      100% I've learned my lesson- won't use music, or make it this loud again. Thanks for confirming. I've had a few comments about this.

  • @bdanimation2801
    @bdanimation2801 11 месяцев назад +1

    You dont have to spell the whole word of moving average.. just type MA, chatgpt will understand it.. i create EA with chatgpt also..

  • @shivensharma5837
    @shivensharma5837 Год назад +1

    You tried only one time and there is no any error in compile , but now we are trying chatgpt there are lot's of error.
    Same to same thing i mentioned in chatgpt as you mentioned in ,, but in my code there is error. After that i place your code then there is no any error.
    Why this happening ?

    • @AdamHarrisTrader
      @AdamHarrisTrader  Год назад

      Hi Shiven- I wanted to say that it seems my first attempts ever were a fluke, just luck. I tried something simple and it happened to work. I get plenty of errors nowadays. It's possible that since the release of GPT4, there have been modifications under the hood about how code for MT4 is generated, for safety reasons, I'm not sure. But, it does indeed seem trickier. If I get a clear answer on this, I will come back to you.

    • @macnonymous3835
      @macnonymous3835 Год назад

      Put the error message back into ChatGPT and ask it to fix the code. Do one at a time if you have to. Hope this helps.

  • @znagy1041
    @znagy1041 11 месяцев назад +1

    It is very hard to follow the topic with this music. I give up for today.

    • @AdamHarrisTrader
      @AdamHarrisTrader  9 месяцев назад

      My apologies. I won't add music going forwards. Didn't seem so loud when I was playing it back, but there have been several comments. I will upload it again without the music.

    • @znagy1041
      @znagy1041 9 месяцев назад

      @@AdamHarrisTrader Never mind! The value of this lecture is still amazing.

  • @Nutri_MY
    @Nutri_MY Год назад +1

    Sorry but thus will not work in real time.. It will give you false signals...
    Indicators does not work .. The sad truth.

    • @JayronJanis
      @JayronJanis Год назад

      //The purpose is to use this as a foundation and then modify with other custom functions & ideas you come up with.
      //not one indicator will ever work on its own, you have to isolate where false signals appear then edit code to reduce false signals
      //use your imagination, get creative

  • @zfj6681
    @zfj6681 Год назад +1

    Epic