//+------------------------------------------------------------------+
//|                                                entryinfo.mq4 |
//|                             Copyright © 2008, seattlefinish@gmail.com |
//|                                    http://www.seattlefinish@gmail.com |
//+------------------------------------------------------------------+
#property copyright "Copyright © Dale"
#property link      "http://www.seattlefinish@gmail.com"

#property indicator_chart_window
//Add I Swing LOw? use bar count and if else to check if <> swing/ get swing code Will need to do prior to script
extern double       Risk = 10;
bool lastLow = true;
int deinit() {

   Comment("");
   return(0);
   
}

int start() {

 
   int SpreadPointss = MarketInfo(Symbol(),MODE_SPREAD);  
 

   int l = Bars;
   int i = 0;
   int time;
   string commentString;

  
   for (i=0; i<l; i++) {
      
    
    double SpreadPoints = (SpreadPointss*Point);
    double OnePoint = (1*Point);
    double Value = MarketInfo(Symbol(), MODE_TICKVALUE);
    

 
    double StopLoss = ( (High[1]+(SpreadPoints+OnePoint)) - (Low[1]-(SpreadPoints-OnePoint) ) ) / Point;
    double LotsBar = NormalizeDouble(Risk/StopLoss/(MarketInfo(Symbol(), MODE_TICKVALUE)),4);
 
  
 
      if (lastLow) {
         if (1==1) {
         
            time = Time[i];
            commentString = "LOTSBAR = " +  DoubleToStr(LotsBar,2)           
 
 
            
             +"   LOWERINFO = " +    DoubleToStr((Low[1] - OnePoint),4)
             +"   UPPERINFO = " +  DoubleToStr((High[1]+SpreadPoints +OnePoint),4)
             +" SPREAD ="+ DoubleToStr(SpreadPointss,1)
             +" TICKVALUE ="+ DoubleToStr(Value,5);                                          
   
             
             
             
             
             
             
         
            Comment (commentString);
            break;
         
         }

      
      }
      
   }
   
   return(0);

}

