Download MetaTrader 5

Make Indicator update only once and never changed the appearance

To add comments, please log in or register
jackee1234
197
jackee1234  

Is that a way to let the indicator update the chart once, and for the subsequent, it will remember the old results rather than update every tick or candle?

I am asking this question since I only let the start() run once with the following code:

bool first=true;

int start(){
 if(first){

   //my code here
    first=false;
 }

}

and I set the indicator using buffer. After every candle update, the indicator move to another candle beside (since the buffer array has updated)..I would like them to stay at that candle forever. What should I do?

whroeder1
15934
whroeder1  
  1. Don't paste code
    Play video
    Please edit your post.
    For large amounts of code, attach it

  2. What should you do about what? You already have code that never updates again, thus your buffer "stays at that candle forever."
To add comments, please log in or register