Lowest AccountProfit

 
double Profit = AccountProfit();
      
   
                       
       for(int i = 0; i < 0; i--) 
        {         
           double LowestProfit = AccountProfit();
           {
           if(LowestProfit < Profit)
            {            
              Profit  = LowestProfit;
          
            }
          }  
        }   
 

Hi traders,


Trying to find the lowest price of AccountProfit but the Profit price remains always the same.

What am I doing wrong here?

Thx a lot.

Amirio

 
Amirio #: Trying to find the lowest price of AccountProfit but the Profit price remains always the same. What am I doing wrong here?

Your code makes no sense. Your "loop" will not even run.

 
double Profit       = AccountProfit();

double LowestProfit = 0:
                            
   
          if(Profit < LowestProfit)
            {            
              LowestProfit = Profit;          
            }


and here the value of LowestProfit is always Profit....how can i get the lowest value of AccountProfit?

Thx your help.