下载MetaTrader 5

Dear Rosh,how to make a indicator without the function Bars?

要添加评论,请登录注册
mailema
40
mailema  

how to make a indicator without the function Bars?

for example:I want to make a indicator (Macd),use the newest 1000 bars,

so don't want to use the Bars,and the Indicatorcounted(),

could you give me an example? Thanks

Rashid Umarov
管理员
11993
Rashid Umarov  

Try this

extern int countBars = 1000;
 
....
 
int start()
  {
   for (int i = countBars; i>=0; i--)
      {
       //indicator algorithm code
      ... 
      }
 ....
//------
  return;
  }
要添加评论,请登录注册