Sign Up

Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here
Sign InSign Up

First independent community of traders

First independent community of traders Logo First independent community of traders Logo

First independent community of traders Navigation

  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • Buy Theme
  • Home
  • About Us
  • Blog
  • Contact Us
Home/ Questions/Q 4262
Next
In Process
lil_lil
lil_lil

lil_lil

  • 2 Questions
  • 5 Answers
  • 0 Best Answers
  • 20 Points
View Profile
  • 0
lil_lil
Asked: December 27, 20202020-12-27T05:04:53+00:00 2020-12-27T05:04:53+00:00In: Forex Expert Advisors

How is it guaranteed to get a signal from the drawing indicator?

  • 0

Hello. The indicator can redraw more than six bars.

The color of the line can change on the third or fifth bar, it is unstable.

How do I know that the color has changed now, no matter on which bar?

      sell_1=NormalizeDouble(iCustom(Symbol(),0,"mymy",1,1),Digits);
      sell_2=NormalizeDouble(iCustom(Symbol(),0,"mymy",1,2),Digits);
      if(sell_1!=0.0 && sell_1_2==0.0)
      {
       open_pos(magic);
      }

  • 7 7 Answers
  • 0 Followers
  • 0
Answer
Share
  • Facebook

    7 Answers

    • Voted
    • Oldest
    • Recent
    1. lil_lil

      lil_lil

      • 2 Questions
      • 5 Answers
      • 0 Best Answers
      • 20 Points
      View Profile
      lil_lil
      2020-12-27T05:05:36+00:00Added an answer on December 27, 2020 at 5:05 am

      Vitalii Ananev:see how the buffer values of this indicator change and follow the color change. 

      The line is red, buffer #1 on each bar is full. The price, quickly up, on five bars became an empty buffer. The color on the five bars turned green. Not necessarily 5. There is a different number of bars. As soon as these buffers become empty, a signal is needed. How do I get it?

      Igor Makanu:

      probably you need to control the opening of a new bar to do – or not copy the zero bar

      I made a recalculation on the new bar, I do not copy the zero bar. The same print on each bar, although the color has not changed, the Line is constantly moving, but the value in the first buffer does not change, either zero or the price. The price is in the buffer when the line is red.

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    2. saasa_ivanov

      saasa_ivanov

      • 0 Questions
      • 6 Answers
      • 0 Best Answers
      • 32 Points
      View Profile
      saasa_ivanov
      2020-12-27T05:05:29+00:00Added an answer on December 27, 2020 at 5:05 am

      Hi!

      The theme smells like trolling .

      “As GUARANTEED ….” and then you can already score on this topic , Gee Gee Gee…

      type code changed and here’s the Grail, which will give “guaranteed” signals…. 

      and some even try to advise him … Gee Gee Gee ..

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    3. lil_lil

      lil_lil

      • 2 Questions
      • 5 Answers
      • 0 Best Answers
      • 20 Points
      View Profile
      lil_lil
      2020-12-27T05:05:18+00:00Added an answer on December 27, 2020 at 5:05 am

      Vitalii Ananev:

      If the indicator changes values on already closed bars, except for the current one, then I would not use it.

      Yes, you can change the color on the sixth bar, but you need to get a signal.

      Sergey Savinkin:

      You need to know which buffer of the indicator is responsible for the color.

      Buffer with index 1-red color here is the condition from the given code: if there is red on the first bar and there is no red on the second one

      if(sell_1!=0.0 && sell_1_2==0.0)

      selling. As I said before, sometimes the color changes immediately for 5 bars.

      To open a position on such a signal, you need to write down the condition: if there is red on the fifth bar, there is no red on the sixth bar, I sell. But this is not correct, the color could also change on the near bars

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    4. igorm

      igorm

      • 0 Questions
      • 17 Answers
      • 0 Best Answers
      • 54 Points
      View Profile
      igorm
      2020-12-27T05:05:14+00:00Added an answer on December 27, 2020 at 5:05 am

      lil_lil:

      How do I know that the color has changed now, no matter on which bar?

      something like this should be:

      static double last_ind[8,100];
      //+------------------------------------------------------------------+
      void OnTick()
        {
         double ind[8,100];
         for(int j=0;j<100;j++)
           {
            for(int i=0;i<8;i++)
              {
               ind[i,1]=GetIndBuffer(i,j);
              }
           }
         if(ArrayCompare(last_ind,ind)= =0) Print("no changes in the indicator!!!");
         else
           {
            ArrayCopy(last_ind,ind);
            Print("the Indicator has been redrawn!!!");
           }
        }
      //+------------------------------------------------------------------+
      double GetIndBuffer(int nbuff_,int nbar_)
        {
         return(iCustom(NULL,PERIOD_CURRENT,"name",nbuff_,nbar_));
        }  
      //+------------------------------------------------------------------+

      but you need to check, I do not like the built-in MQL functions when working with arrays, anything can be (I’m talking about ArrayCompare() and ArrayCopy()) I would rewrite them for this case

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    5. savinkins

      savinkins

      • 0 Questions
      • 13 Answers
      • 0 Best Answers
      • 46 Points
      View Profile
      savinkins
      2020-12-27T05:05:06+00:00Added an answer on December 27, 2020 at 5:05 am

      lil_lil:

      There is no indicator code. This piece is a call to the indicator and opening a position on the signal on the first bar. Positions are opened, but it happens, it was checked on visualization that the indicator line is green on the first bar, the price quickly goes down and the line becomes red 3, 4 or 6 bars ago, of course, my code skips such a color change. How do I know at the moment that the color has changed?

      You need to know which buffer of the indicator is responsible for the color. Just use the expert Advisor to call more buffers. Set the output of messages and track how the color change affected the change in the value of which buffer.

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    6. lil_lil

      lil_lil

      • 2 Questions
      • 5 Answers
      • 0 Best Answers
      • 20 Points
      View Profile
      lil_lil
      2020-12-27T05:05:01+00:00Added an answer on December 27, 2020 at 5:05 am

      Vitalii Ananev:

      There is too little information in your piece of code to understand the logic of the indicator.

      There is no indicator code. This piece is a call to the indicator and opening a position on the signal on the first bar. Positions are opened, but it happens, it was checked on visualization that the indicator line is green on the first bar, the price quickly goes down and the line becomes red 3, 4 or 6 bars ago, of course, my code skips this color change. How do I know at the moment that the color has changed?

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    7. vitales

      vitales

      • 1 Question
      • 22 Answers
      • 0 Best Answers
      • 66 Points
      View Profile
      vitales
      2020-12-27T05:04:57+00:00Added an answer on December 27, 2020 at 5:04 am

      lil_lil:

      Hello. The indicator can redraw more than six bars.

      The color of the line can change on the third or fifth bar, it is unstable.

      How do I know that the color has changed now, no matter on which bar?

      There is too little information in your piece of code to understand the logic of the indicator.

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    Leave an answer

    Leave an answer
    Cancel reply

    Browse

    Sidebar

    Ask A Question

    Stats

    • Questions 504
    • Answers 2k
    • Posts 5
    • Comments 0
    • Best Answers 0
    • Users 681
    • Popular
    • Comments
    • Tags
    • forexcommunity

      Highlighting what’s important about questions & Answers on Discy Community!

      • 0 Comments
    • forexcommunity

      Introducing Keyboard Shortcuts, our first Labs feature

      • 0 Comments
    • forexcommunity

      Defining quality on Discy Engine — what a helpful answer ...

      • 0 Comments
    • forexcommunity

      Organizational and company accounts on Discy Engine the next step

      • 0 Comments
    • forexcommunity

      Hello world!

      • 0 Comments

    Related Questions

    • Brus Agell

      Правельный выбор

      • 0 Answers
    • pinupcasinoo

      Pin Up Casino

      • 0 Answers
    • c00l777

      During optimization, indicators that are not present in the robot ...

      • 2 Answers
    • c00l777

      During optimization, indicators that are not present in the robot ...

      • 0 Answers
    • c00l777

      Optimization results differ on different accounts

      • 3 Answers

    Users

    Leonardcig

    Leonardcig

    • 0 Questions
    • 0 Answers
    DennisByday

    DennisByday

    • 0 Questions
    • 0 Answers
    Haroldmeary

    Haroldmeary

    • 0 Questions
    • 0 Answers

    Footer

    First independent community of traders

    About

    An independent community of forex traders. This is where traders communicate. You can ask your questions and you will receive an answer to your question.
    • Terms of Use
    • Privacy Policy
    • Cookie Policy
    • Knowledge Base
    • Support

    © 2021 Forexcommunity.net. All Rights Reserved