Navigation:Home > Content >

swap_or_cost_point.mq4

Time: 2017-06-08 | Download file:swap_or_cost_point.mq4

//+------------------------------------------------------------------+ 
//| Cost of Point.mq4 | 
//| Copyright © 2005, Mindaugas, модиф. Юг | 
//| http://viac.ru | 
//+------------------------------------------------------------------+ 
#property copyright "Copyright © 2005, Mindaugas, модиф. Юг"
#property link "http://viac.ru" 

extern int     cost0_swap1=1;
extern double  lEURUSD=-0.7, lUSDCHF=1.1, lGBPUSD=0.09, lUSDJPY=1.2, lAUDUSD=0.24, lUSDCAD=0.23, 
               lEURCHF=0.49, lEURJPY=0.69, lEURGBP=-0.49, lGBPJPY=2.35, lGBPCHF=2.2; 
extern double  sEURUSD=0.53, sUSDCHF=-1.32, sGBPUSD=-0.37, sUSDJPY=-1.38, sAUDUSD=-0.35, sUSDCAD=-0.41, 
               sEURCHF=-0.73, sEURJPY=-0.89, sEURGBP=0.39, sGBPJPY=-2.68, sGBPCHF=-2.61; 


int init() { 
return(0); 
} 

int deinit() { 
return(0); 
} 

int start() { 

double lots = 0.1; 
double EURUSD, USDCHF, GBPUSD, USDJPY, AUDUSD, USDCAD, EURCHF, EURJPY, EURGBP, GBPJPY, GBPCHF; 

EURUSD=NormalizeDouble (10*lots,2); 
USDCHF=NormalizeDouble ((10/MarketInfo("USDCHF",MODE_BID)*lots),2); 
GBPUSD=NormalizeDouble (7*lots,2); 
USDJPY=NormalizeDouble ((1000/MarketInfo("USDJPY",MODE_BID)*lots),2); 
AUDUSD=NormalizeDouble (20*lots,2); 
USDCAD=NormalizeDouble ((10/MarketInfo("USDCAD",MODE_BID)*lots),2); 
EURCHF=NormalizeDouble ((10/MarketInfo("USDCHF",MODE_BID)*lots),2); 
EURJPY=NormalizeDouble ((1000/MarketInfo("USDJPY",MODE_BID)*lots),2); 
EURGBP=NormalizeDouble ((10*MarketInfo("GBPUSD",MODE_BID)*lots),2); 
GBPJPY=NormalizeDouble ((700/MarketInfo("USDJPY",MODE_BID)*lots),2); 
GBPCHF=NormalizeDouble ((7/MarketInfo("USDCHF",MODE_BID)*lots),2); 

if (cost0_swap1==1)
   {Comment 
         ("\nEURUSD "," | ",NormalizeDouble (EURUSD*lEURUSD,2)," | ",NormalizeDouble (EURUSD*sEURUSD,2), 
         "\nUSDCHF "," | ",NormalizeDouble (USDCHF*lUSDCHF,2)," | ",NormalizeDouble (USDCHF*sUSDCHF,2),
         "\nGBPUSD "," | ",NormalizeDouble (GBPUSD*lGBPUSD,2)," | ",NormalizeDouble (GBPUSD*sGBPUSD,2),
         "\nUSDJPY  "," | ",NormalizeDouble (USDJPY*lUSDJPY,2)," | ",NormalizeDouble (USDJPY*sUSDJPY,2), 
         "\nAUDUSD "," | ",NormalizeDouble (AUDUSD*lAUDUSD,2)," | ",NormalizeDouble (AUDUSD*sAUDUSD,2), 
         "\nUSDCAD "," | ",NormalizeDouble (USDCAD*lUSDCAD,2)," | ",NormalizeDouble (USDCAD*sUSDCAD,2),
         "\nEURCHF "," | ",NormalizeDouble (EURCHF*lEURCHF,2)," | ",NormalizeDouble (EURCHF*sEURCHF,2), 
         "\nEURJPY  "," | ",NormalizeDouble (EURJPY*lEURJPY,2)," | ",NormalizeDouble (EURJPY*sEURJPY,2), 
         "\nEURGBP "," | ",NormalizeDouble (EURGBP*lEURGBP,2)," | ",NormalizeDouble (EURGBP*sEURGBP,2), 
         "\nGBPJPY  "," | ",NormalizeDouble (GBPJPY*lGBPJPY,2)," | ",NormalizeDouble (GBPJPY*sGBPJPY,2), 
         "\nGBPCHF "," | ",NormalizeDouble (GBPCHF*lGBPCHF,2)," | ",NormalizeDouble (GBPCHF*sGBPCHF,2)); 
     }
if (cost0_swap1==0)
   {Comment 
         ("\nEURUSD "," | ",EURUSD, 
         "\nUSDCHF "," | ",USDCHF,
         "\nGBPUSD "," | ",GBPUSD,
         "\nUSDJPY  "," | ",USDJPY, 
         "\nAUDUSD "," | ",AUDUSD, 
         "\nUSDCAD "," | ",USDCAD,
         "\nEURCHF "," | ",EURCHF, 
         "\nEURJPY  "," | ",EURJPY, 
         "\nEURGBP "," | ",EURGBP, 
         "\nGBPJPY  "," | ",GBPJPY, 
         "\nGBPCHF "," | ",GBPCHF); 
     }
return(0); 
} 

Recommend