Download MetaTrader 5

SnakeForce.mq4

To add comments, please log in or register
Naguisa Unada
119
Naguisa Unada  
void Drawing( int Shift)
{
   double val,Dval;
   val = 5 * (Mart[Shift] - Mart[ ArrayMinimum (Mart,cPeriod,Shift)]) / 9 ;
   Dval = 5 * (Mart[Shift] - 
           Mart[Shift + 1 ] + 
           Mart[ ArrayMinimum (Mart,cPeriod,Shift + 1 )] - 
           Mart[ ArrayMinimum (Mart,cPeriod,Shift)]   ) / 9 ;
   if (Dval > 0 ) 
   {
      ForceUp[Shift] = val;
      ResistanceUp[Shift] = 0 ;
   }
   else 
   {
      ForceUp[Shift] = 0 ;
      ResistanceUp[Shift] = val;
   }
   val = 5 * (Mart[Shift] - Mart[ ArrayMaximum (Mart,cPeriod,Shift)]) / 9 ;
   Dval = 5 * (Mart[Shift] - 
           Mart[Shift + 1 ] + 
           Mart[ ArrayMaximum (Mart,cPeriod,Shift + 1 )] - 
           Mart[ ArrayMaximum (Mart,cPeriod,Shift)]   ) / 9 ;
   if (Dval < 0 ) 
   {
      ForceDown[Shift] = val;
      ResistanceDown[Shift] = 0 ;
   }
   else 
   {
      ForceDown[Shift] = 0 ;
      ResistanceDown[Shift] = val;
   }
   return ;
}

This is the Drawing function of SnakeForce.mq4.

After calculating the variable "Mart", it calculate ForceUp, ForceDown, ResistanceUp, ResistanceDown in this function, but I don't understand what do the numbers 5 and 9 mean here.

I know that this indicator repaints. I just want to know how to calculate Force and Resistance.

Thank you for your help.

http://www.abysse.co.jp/mt4/indicators/SnakeForce.mq4

whroeder1
16278
whroeder1  
Naguisa Unada: what do the numbers 5 and 9 mean here.
It means 5/9 (0.5556) of the value in between. Nothing more.
Naguisa Unada
119
Naguisa Unada  
whroeder1 :
It means 5/9 (0.5556) of the value in between. Nothing more.

Oh, is that something like that?

Thank you very much.

To add comments, please log in or register