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 5659
Next
In Process
user_mt5
user_mt5

user_mt5

  • 4 Questions
  • 7 Answers
  • 0 Best Answers
  • 20 Points
View Profile
  • 0
user_mt5
Asked: December 29, 20202020-12-29T09:59:34+00:00 2020-12-29T09:59:34+00:00In: Forex Expert Advisors

Implementation in indicators.

  • 0

I’m trying to understand the philosophy of using the copybuffer() function in identifiers.
Here in the penultimate line is the code:

if(CopyBuffer(ma_handle,0,0,to_copy,MABuffer)<=0) return(0)

I am interested in the general approach shown here.
As far as I understand, the red-highlighted 0 means that every time OnCalculate() is executed, the full data set is copied, starting from zero to the current bar.

In my opinion, this is a very expensive operation, i.e. instead of zero, you should specify something like prev_calculated, i.e. not copy the entire data set, but only one last bar. If the source indicator is redrawn, then only the area to be redrawn should be copied, but it is still only the last few bars.
The copybuffer() format allows this approach. However, 0 is specified. Why?
I guess I don’t know something or don’t take it into account. Please help me figure it out.

  • 1 1 Answer
  • 0 Followers
  • 0
Answer
Share
  • Facebook

    1 Answer

    • Voted
    • Oldest
    • Recent
    1. user_mt5

      user_mt5

      • 4 Questions
      • 7 Answers
      • 0 Best Answers
      • 20 Points
      View Profile
      user_mt5
      2020-12-29T09:59:38+00:00Added an answer on December 29, 2020 at 9:59 am

      The question is removed..
      It’s all backwards, it turns out. “Read the instructions..”

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

    Anthonygrase

    Anthonygrase

    • 0 Questions
    • 0 Answers
    HiramJanny

    HiramJanny

    • 0 Questions
    • 0 Answers
    Geraldimaky

    Geraldimaky

    • 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