/* xMeterMTF_Ind.mq4 Copyright © 2007, MetaQuotes Software Corp. Price Meter System™ ©GPL Hartono Setiono 5/17/2007 Redsigned based on xMeter_mini.mq4 indicator */ #property copyright "x Meter System™ ©GPL" #property link "forex-tsd dot com" #include #include #define ARRSIZE 12 // number of pairs !!!DON'T CHANGE THIS NUMBER!!! #define PAIRSIZE 7 // number of currencies !!!DON'T CHANGE THIS NUMBER!!! #define TABSIZE 10 // scale of currency's power !!!DON'T CHANGE THIS NUMBER!!! #define ORDER 2 // available type of order !!!DON'T CHANGE THIS NUMBER!!! extern bool AccountIsIBFXmini = false; extern int mTimeFrame = 1440; extern int mPeriod=3; string aPair[ARRSIZE] = {"EURUSD","GBPUSD","AUDUSD","USDJPY","USDCHF","USDCAD", "EURJPY","EURGBP","EURCHF","EURAUD","GBPJPY","GBPCHF"}; string aMajor[PAIRSIZE] = {"USD","EUR","GBP","CHF","CAD","AUD","JPY"}; color aColor[PAIRSIZE] = {Red, Yellow, DarkOrange, DodgerBlue, Aqua, Magenta, DeepPink}; int aMajorPos[PAIRSIZE] = {130, 110, 90, 70, 50, 30, 10}; string aOrder[ORDER] = {"BUY ","SELL "}; int aTable[TABSIZE] = {0,3,10,25,40,50,60,75,90,97}; // grade table for currency's power double curr1[]; double curr2[]; double curr3[]; double curr4[]; double curr5[]; double curr6[]; double curr7[]; //+------------------------------------------------------------------+ // expert initialization function | //+------------------------------------------------------------------+ int init() { int i; IndicatorBuffers(PAIRSIZE); SetIndexBuffer(0,curr1); SetIndexBuffer(1,curr2); SetIndexBuffer(2,curr3); SetIndexBuffer(3,curr4); SetIndexBuffer(4,curr5); SetIndexBuffer(5,curr6); SetIndexBuffer(6,curr7); for(i=0; i0) counted_bars--; limit=Bars-counted_bars; for(i=0; i0) aMeter[pindex]=NormalizeDouble(cmeter / cnt,1); else aMeter[pindex]=-1; //Print(aMajor[pindex],":",StringSubstr(aPair[index],1,3),":",StringSubstr(aPair[index],4,3),":",cmeter,":",cnt); } } } return(0); // end of start funtion } //+------------------------------------------------------------------+ // expert custom function | //+------------------------------------------------------------------+ double GetPoint(string mSymbol) { double myPoint = 0.0001, YenPoint = 0.01; string mySymbol; if (StringSubstr(mySymbol,3,3) == "JPY") return (YenPoint); return(myPoint); } int iLookup(double ratio) // this function will return a grade value { // based on its power. int index=-1, i; if (ratio <= aTable[0]) index = 0; else { for (i=1; i