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 3202
Next
In Process
alvin1976
alvin1976

alvin1976

  • 1 Question
  • 3 Answers
  • 0 Best Answers
  • 20 Points
View Profile
  • 0
alvin1976
Asked: December 26, 20202020-12-26T13:16:40+00:00 2020-12-26T13:16:40+00:00In: Forex Expert Advisors

The Bars function returns different results on different PCs

  • 0

Salute to all !

Maybe someone has encountered this.

In the robot, I run the Bars function.

Print("ordlife=",Bars(Symbols[s],PERIOD_D1,OrdTime[i],TimeCurrent()));
The results were correct on two different PCs until I moved the robot to another machine (MT build 1940 and OS Win 7 64bit, i7).

I compiled it there and received 5000 bars in response, although the check showed that the order setting time and the current time are determined correctly.

On all machines, the terminal is MT build 1940.

What could be the problem ?

  • 8 8 Answers
  • 0 Followers
  • 0
Answer
Share
  • Facebook

    8 Answers

    • Voted
    • Oldest
    • Recent
    1. alvin1976

      alvin1976

      • 1 Question
      • 3 Answers
      • 0 Best Answers
      • 20 Points
      View Profile
      alvin1976
      2020-12-26T13:17:25+00:00Added an answer on December 26, 2020 at 1:17 pm

      Artyom Trishkin:

      Do you check for history based on the requested data? Are you checking the completion of history synchronization based on the data requested for the first time? Or do you immediately request the number of bars?

      And if there is no history yet, or it is not fully synchronized, what should Bars () return in this case?

      Alexey Viktorov:

      Try to find the reason why the function does not see the history,
      why the data is not loaded. After all, in your example, not the current character. Is
      it even displayed in MarketWatch???

      In the tester, all symbols that are being accessed are automatically opened.

      Synchronization is done during initialization for all working timeframes. With subsequent verification. In my example, I substitute the current character. You should have written to me right away.

      But can you explain why when you change the maximum number of bars in the window from 5000 to 20000, the “Bars” function starts working correctly ?

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

      mvs

      • 0 Questions
      • 49 Answers
      • 0 Best Answers
      • 136 Points
      View Profile
      mvs
      2020-12-26T13:17:20+00:00Added an answer on December 26, 2020 at 1:17 pm

      I Pat the steel with such dialogues)

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

      alexeyvik

      • 1 Question
      • 74 Answers
      • 0 Best Answers
      • 172 Points
      View Profile
      alexeyvik
      2020-12-26T13:17:15+00:00Added an answer on December 26, 2020 at 1:17 pm

      Alexey Kravchenko:

      Yes, with such a large rating as you can probably write for everyone…. Russian language is only left to learn 🙂

      I don’t need to learn Russian. There are some words that are deliberately distorted, just for fun and not only by me.

      Try to find the reason why the function does not see the history, why the data is not loaded. After all, in your example, not the current character. Is it even displayed in MarketWatch???

      Forum on trading, automated trading systems and testing of trading strategies

      The Bars function returns different results on different PCs

      Alexey Kravchenko, 2019.01.14 13:20

      I have a limit of 5000 bars. Isn’t that enough ?

      Bars(Symbols[s],PERIOD_D1,TimeCurrent(),TimeCurrent()));

      Returns also 5000. On other machines of course zero )

      What is interesting is that everything is fine in the tester, but in real mode it is buggy….

      In the tester, all symbols that are being accessed are automatically opened.

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

      artmedia70

      • 1 Question
      • 41 Answers
      • 0 Best Answers
      • 102 Points
      View Profile
      artmedia70
      2020-12-26T13:17:10+00:00Added an answer on December 26, 2020 at 1:17 pm

      Alexey Kravchenko:

      Yes, with such a large rating as you can probably write for everyone…. Russian language is only left to learn 🙂

      I don’t see any spelling or punctuation errors in Alexey. I see you have it.

      And you, except for the spelling of Alexey, have nothing more to say?

      Do you check for history based on the requested data? Are you checking the completion of history synchronization based on the data requested for the first time? Or do you immediately request the number of bars?

      And if there is no history yet, or it is not fully synchronized, what should Bars () return in this case?

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

      alvin1976

      • 1 Question
      • 3 Answers
      • 0 Best Answers
      • 20 Points
      View Profile
      alvin1976
      2020-12-26T13:17:05+00:00Added an answer on December 26, 2020 at 1:17 pm

      Alexey Viktorov:

      The others don’t have ambushes.

      Yes, with such a large rating as you can probably write for everyone…. Russian language is only left to learn 🙂

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

      alexeyvik

      • 1 Question
      • 74 Answers
      • 0 Best Answers
      • 172 Points
      View Profile
      alexeyvik
      2020-12-26T13:16:55+00:00Added an answer on December 26, 2020 at 1:16 pm

      Alexey Kravchenko:

      Set the maximum value of bars in the window 20000 and restarted the terminal. It worked as it should.

      But in General, for those who do not know, this is a specific ambush !

      Zy. I Propose to introduce a separate topic on the forum ” Ambushes of the MT5 terminal” 🙂

      I want to clarify the name of the topic. “Ambushes of the MT5 terminal at Kravchenko”.

      The others don’t have ambushes. Especially those.

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

      alvin1976

      • 1 Question
      • 3 Answers
      • 0 Best Answers
      • 20 Points
      View Profile
      alvin1976
      2020-12-26T13:16:48+00:00Added an answer on December 26, 2020 at 1:16 pm

      Ilya Baranov:

      Possible due to setting the maximum number of bars on the chart

      I have a limit of 5000 bars. Isn’t that enough ?

      Bars(Symbols[s],PERIOD_D1,TimeCurrent(),TimeCurrent()));

      Returns also 5000. On other machines of course zero )

      What is interesting is that everything is fine in the tester, but in real mode it is buggy….

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    8. mocris

      mocris

      • 1 Question
      • 5 Answers
      • 0 Best Answers
      • 30 Points
      View Profile
      mocris
      2020-12-26T13:16:43+00:00Added an answer on December 26, 2020 at 1:16 pm
      The Bars function returns different results on different PCs

      Alexey Kravchenko:

      Salute to all !

      Maybe someone has encountered this.

      In the robot, I run the Bars function.

      The results were correct on two different PCs until I moved the robot to another machine (MT build 1940 and OS Win 7 64bit, i7).

      I compiled it there and received 5000 bars in response, although the check showed that the order setting time and the current time are determined correctly.

      On all machines, the terminal is MT build 1940.

      What could be the problem ?

      Possible due to setting the maximum number of bars on the chart

      • 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 677
    • 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

    HiramJanny

    HiramJanny

    • 0 Questions
    • 0 Answers
    Geraldimaky

    Geraldimaky

    • 0 Questions
    • 0 Answers
    Jeffreytix

    Jeffreytix

    • 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