Mathz

1 replies

Threshold

Customer, bbp_participant, community, 723 replies.

Visit profile

10 years ago #112155

Any way to simply this into an equation?

ATR(10)[1]<ATR(10)[2]

and ATR(10)[1]<ATR(10)[3]
and ATR(10)[1]<ATR(10)[4]

and ATR(10)[1]<ATR(10)[5]

and ATR(10)[1]<ATR(10)[6]

and ATR(10)[1]<ATR(10)[7]

and ATR(10)[1]<ATR(10)[8]

and ATR(10)[1]<ATR(10)[9]

and ATR(10)[1]<ATR(10)[10]

and ATR(10)[1]<ATR(10)[11]

…….

…….

……

and ATR(10)[1]<ATR(10)[99]

and ATR(10)[1]<ATR(10)[100]

 

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

10 years ago #124517

there is a way with a little programing. the best way would be to create a custom function

 

bool checkATRCondition() {
   for(int i=2; i<100; i++) {
      if(iATR(NULL, 0, 10, 1) >= iATR(NULL, 0, 10, 2)) {
         return(false);
      }
   }  
   
   return(true);
}
 
in EA Wizard/code/CustomFuncitons.mq4
and then use it in your EAW rule as CustomFunction: checkATRCondition() is True

Mark
StrategyQuant architect

0

Viewing 1 replies (of 1 total)