fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    MT5 Timeframes

    Tutorials by Users
    6
    12
    888
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jstap
      jstap last edited by

      On MT5 the time frame returned is often a large number not the minutes. This is a way to return the minutes into a variable:
      https://fxdreema.com/shared/rCOJx10Bb

      Learn fxDreema Without the Wait!

      My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

      The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

      Don’t miss out

      Click here➡️ https://mybook.to/fxDreema to get your copy today!

      Enjoy! 😊

      AlirezaTrade V 3 Replies Last reply Reply Quote 2
      • AlirezaTrade
        AlirezaTrade @jstap last edited by

        Thank you very much, dear @jstap. This code was very efficient.

        jstap 1 Reply Last reply Reply Quote 0
        • V
          Vortrexcian @jstap last edited by

          @jstap

          Thank you so very much Bud.
          Truly a Legend for doing this.
          This helps me out so much.

          Great work as always.

          🙇

          jstap 1 Reply Last reply Reply Quote 0
          • V
            Vortrexcian @jstap last edited by

            @jstap

            On top of this.

            If I want the chart to always be on a M5, how would one go about having a message display "Not on correct Time Frame, must be on M5"

            Not that important, merely playing around with a few ideas.

            jstap 2 Replies Last reply Reply Quote 0
            • l'andorrà
              l'andorrà last edited by

              Thank you very much for sharing.

              (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

              (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

              (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

              1 Reply Last reply Reply Quote 0
              • jstap
                jstap @AlirezaTrade last edited by

                @AlirezaTrade You are welcome, glad it was useful

                Learn fxDreema Without the Wait!

                My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                Don’t miss out

                Click here➡️ https://mybook.to/fxDreema to get your copy today!

                Enjoy! 😊

                1 Reply Last reply Reply Quote 0
                • jstap
                  jstap @Vortrexcian last edited by

                  @Vortrexcian @AlirezaTrade You are welcome, glad it was useful

                  Learn fxDreema Without the Wait!

                  My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                  The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                  Don’t miss out

                  Click here➡️ https://mybook.to/fxDreema to get your copy today!

                  Enjoy! 😊

                  1 Reply Last reply Reply Quote 0
                  • jstap
                    jstap @Vortrexcian last edited by jstap

                    @l-andorrà 👍

                    Learn fxDreema Without the Wait!

                    My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                    The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                    Don’t miss out

                    Click here➡️ https://mybook.to/fxDreema to get your copy today!

                    Enjoy! 😊

                    1 Reply Last reply Reply Quote 0
                    • jstap
                      jstap @Vortrexcian last edited by

                      @Vortrexcian use that variable in a condition block, TFM != 5 - text block

                      Learn fxDreema Without the Wait!

                      My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                      The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                      Don’t miss out

                      Click here➡️ https://mybook.to/fxDreema to get your copy today!

                      Enjoy! 😊

                      1 Reply Last reply Reply Quote 1
                      • Vahab.K
                        Vahab.K last edited by

                        Thank you, it was very useful, I enjoyed it.

                        1 Reply Last reply Reply Quote 0
                        • stonegoldtz
                          stonegoldtz last edited by

                          //+------------------------------------------------------------------+
                          //| RSI.mq5 |
                          //| Copyright 2000-2025, MetaQuotes Ltd. |
                          //| https://www.mql5.com |
                          //+------------------------------------------------------------------+
                          #property copyright "Copyright 2000-2025, MetaQuotes Ltd."
                          #property link "https://www.mql5.com"
                          #property description "Relative Strength Index"
                          //--- indicator settings
                          #property indicator_separate_window
                          #property indicator_minimum 0
                          #property indicator_maximum 100
                          #property indicator_level1 30
                          #property indicator_level2 70
                          #property indicator_buffers 3
                          #property indicator_plots 1
                          #property indicator_type1 DRAW_LINE
                          #property indicator_color1 DodgerBlue
                          //--- input parameters
                          input int InpPeriodRSI=14; // Period
                          //--- indicator buffers
                          double ExtRSIBuffer[];
                          double ExtPosBuffer[];
                          double ExtNegBuffer[];

                          int ExtPeriodRSI;
                          //+------------------------------------------------------------------+
                          //| Custom indicator initialization function |
                          //+------------------------------------------------------------------+
                          void OnInit()
                          {
                          //--- check for input
                          if(InpPeriodRSI<1)
                          {
                          ExtPeriodRSI=14;
                          PrintFormat("Incorrect value for input variable InpPeriodRSI = %d. Indicator will use value %d for calculations.",
                          InpPeriodRSI,ExtPeriodRSI);
                          }
                          else
                          ExtPeriodRSI=InpPeriodRSI;
                          //--- indicator buffers mapping
                          SetIndexBuffer(0,ExtRSIBuffer,INDICATOR_DATA);
                          SetIndexBuffer(1,ExtPosBuffer,INDICATOR_CALCULATIONS);
                          SetIndexBuffer(2,ExtNegBuffer,INDICATOR_CALCULATIONS);
                          //--- set accuracy
                          IndicatorSetInteger(INDICATOR_DIGITS,2);
                          //--- sets first bar from what index will be drawn
                          PlotIndexSetInteger(0,PLOT_DRAW_BEGIN,ExtPeriodRSI);
                          //--- name for DataWindow and indicator subwindow label
                          IndicatorSetString(INDICATOR_SHORTNAME,"RSI("+string(ExtPeriodRSI)+")");
                          }
                          //+------------------------------------------------------------------+
                          //| Relative Strength Index |
                          //+------------------------------------------------------------------+
                          int OnCalculate(const int rates_total,
                          const int prev_calculated,
                          const int begin,
                          const double &price[])
                          {
                          if(rates_total<=ExtPeriodRSI)
                          return(0);
                          //--- preliminary calculations
                          int pos=prev_calculated-1;
                          if(pos<=ExtPeriodRSI)
                          {
                          double sum_pos=0.0;
                          double sum_neg=0.0;
                          //--- first RSIPeriod values of the indicator are not calculated
                          ExtRSIBuffer[0]=0.0;
                          ExtPosBuffer[0]=0.0;
                          ExtNegBuffer[0]=0.0;
                          for(int i=1; i<=ExtPeriodRSI; i++)
                          {
                          ExtRSIBuffer[i]=0.0;
                          ExtPosBuffer[i]=0.0;
                          ExtNegBuffer[i]=0.0;
                          double diff=price[i]-price[i-1];
                          sum_pos+=(diff>0?diff:0);
                          sum_neg+=(diff<0?-diff:0);
                          }
                          //--- calculate first visible value
                          ExtPosBuffer[ExtPeriodRSI]=sum_pos/ExtPeriodRSI;
                          ExtNegBuffer[ExtPeriodRSI]=sum_neg/ExtPeriodRSI;
                          if(ExtNegBuffer[ExtPeriodRSI]!=0.0)
                          ExtRSIBuffer[ExtPeriodRSI]=100.0-(100.0/(1.0+ExtPosBuffer[ExtPeriodRSI]/ExtNegBuffer[ExtPeriodRSI]));
                          else
                          {
                          if(ExtPosBuffer[ExtPeriodRSI]!=0.0)
                          ExtRSIBuffer[ExtPeriodRSI]=100.0;
                          else
                          ExtRSIBuffer[ExtPeriodRSI]=50.0;
                          }
                          //--- prepare the position value for main calculation
                          pos=ExtPeriodRSI+1;
                          }
                          //--- the main loop of calculations
                          for(int i=pos; i<rates_total && !IsStopped(); i++)
                          {
                          double diff=price[i]-price[i-1];
                          ExtPosBuffer[i]=(ExtPosBuffer[i-1](ExtPeriodRSI-1)+(diff>0.0?diff:0.0))/ExtPeriodRSI;
                          ExtNegBuffer[i]=(ExtNegBuffer[i-1]
                          (ExtPeriodRSI-1)+(diff<0.0?-diff:0.0))/ExtPeriodRSI;
                          if(ExtNegBuffer[i]!=0.0)
                          ExtRSIBuffer[i]=100.0-100.0/(1+ExtPosBuffer[i]/ExtNegBuffer[i]);
                          else
                          {
                          if(ExtPosBuffer[i]!=0.0)
                          ExtRSIBuffer[i]=100.0;
                          else
                          ExtRSIBuffer[i]=50.0;
                          }
                          }
                          //--- OnCalculate done. Return new prev_calculated.
                          return(rates_total);
                          }
                          //+------------------------------------------------------------------+
                          how to present this

                          פוקפורקס Ltd

                          jstap 1 Reply Last reply Reply Quote 1
                          • jstap
                            jstap @stonegoldtz last edited by

                            @stonegoldtz This is not the topic for that, create a question and place it it the questions forum.

                            Learn fxDreema Without the Wait!

                            My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                            The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                            Don’t miss out

                            Click here➡️ https://mybook.to/fxDreema to get your copy today!

                            Enjoy! 😊

                            1 Reply Last reply Reply Quote 1
                            • 1 / 1
                            • First post
                              Last post

                            Online Users

                            G
                            B
                            F
                            K
                            N

                            12
                            Online

                            146.6k
                            Users

                            22.4k
                            Topics

                            122.6k
                            Posts

                            Powered by NodeBB Forums | Contributors