Thread: Signal_Bars_v7
View Single Post
  #192 (permalink)  
Old 05-26-2009, 01:54 PM
AAD's Avatar
AAD AAD is offline
Member
 
Join Date: Feb 2008
Posts: 52
AAD is on a distinguished road
Or perhaps the code below is more simple (no Global or int init() variables required), it seems to work fine...

PHP Code:

//+----------------------------------------------------------------------------------------+
//| Custom indicator iteration function                                                    |
//+----------------------------------------------------------------------------------------+
int start()
{
   
// Auto 5/6 Digit Broker Quote Switch.
   
double DblPoints; if(Digits==5||Digits==3) {DblPoints=Point*10;} else {DblPoints=Point;}
   
// Auto JPY Pair Style Digit Display Switch.
   
double SP1; if(Digits==3) {SP1=Digits-2;} else {SP1=Digits-4;}
   
// Spread.
   
double SPRD=(Ask-Bid)/DblPoints;
   
string SPREAD=DoubleToStr(SPRD,SP1); 
__________________
Pipping ain't easy but someone's got to do it!

Last edited by AAD; 05-26-2009 at 03:03 PM.
Reply With Quote