//+------------------------------------------------------------------+
//|                           _TRO_PsychoMsg                         |
//|                                                                  | 
//|   Copyright � 2007, Avery T. Horton, Jr. aka TheRumpledOne       |
//|                                                                  |
//|   PO BOX 43575, TUCSON, AZ 85733                                 |
//|                                                                  |
//|   GIFTS AND DONATIONS ACCEPTED                                   | 
//|                                                                  |                                         |
//+------------------------------------------------------------------+

#property copyright "Copyright � 2008, Avery T. Horton, Jr. aka TheRumpledOne"
#property link      "therumpledone@gmail.com"

#property indicator_chart_window 
#property indicator_buffers 0




string symbol ;


//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- name for indicator window

   string short_name="TRO_PsychoMsg";
   IndicatorShortName(short_name);
   
   symbol = Symbol() ;
  

   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
   

   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
double xPrice, xPsycho, bid, ask, bidmod, askmod, point ;
int xPoint, spread ;

   point   = MarketInfo(symbol,MODE_POINT);  
   bid     = MarketInfo(symbol,MODE_BID);  
   ask     = MarketInfo(symbol,MODE_ASK);  
   spread  = MarketInfo(symbol,MODE_SPREAD);


   if ( point == 0.01 ) { xPsycho = 0.25; xPoint = 2 ; } 
   else { xPsycho = 0.0025; xPoint = 4 ; }

   bidmod = MathMod(bid ,xPsycho) ;         
   askmod = MathMod(ask ,xPsycho) ;         
 

   if(bidmod == 0 || askmod == 0) { Comment( "Pyscho Price - Spread =", spread  ); }
   else { Comment( "Bid=", DoubleToStr(bid,Digits), "  Ask=", DoubleToStr(ask,Digits), "Spread =", spread  ); }
   
   return(0);
  }