エキスパート: Simplest Hedging EA ever

 

Simplest Hedging EA ever:

ヘッジ勘定にのみ使用します。新しいバーに2つの反対方向のポジションを開きます。

作者: Vladimir Karputov

 
私はこれを提案する。
void OnTick()
  {
   static datetime prev_time=0;
   if(prev_time==iTime(0))
      return;
   prev_time=iTime(0);
に置き換えることを提案する。
void OnTick()
{
  static datetime prev_time = 0;
  static const int period = PeriodSeconds();
  const datetime NewTime = TimeCurrent() / period;
  
  if(prev_time == NewTime)
    return;
    
  prev_time = NewTime;
 
このEAはどのような時間枠で使用されていますか?
 
eaが機能していません。