//+------------------------------------------------------------------+ //| past regression deviated_MTF_Multipair.mq4 | //| Copyright © 2006, MetaQuotes Software Corp. | //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property copyright "Copyright © 2006, MetaQuotes Software Corp." #property link "http://www.metaquotes.net" #property link " cja " #property indicator_chart_window extern bool turn.comment.off=false; extern bool Corner_of_Chart_RIGHT_TOP = true; //extern bool Show_Price = true; //extern bool Show_Xtra_Details = true; //extern bool Show_Smaller_Size = true; extern int Shift_UP_DN =0; extern int Adjust_Side_to_side = 20; extern color BarLabel_color = LightSteelBlue; extern color CommentLabel_color = LightSteelBlue; //**************************************** // Added to identify objects created by this indicator string Object_ID = "prd_mtf_"; //**************************************** extern int MACD_Fast = 8; extern int MACD_Slow = 17; extern int MACD_Signal = 9; extern int MACD_PRICE_TYPE = 0; extern int RSI_Period = 9; extern int RSI_PRICE_TYPE = 0; extern int CCI_Period = 13; extern int CCI_PRICE_TYPE = 0; extern int STOCH_K_Period = 36; extern int STOCH_D_Period = 18; extern int STOCH_Slowing = 9; extern int STOCH_MA_MODE = 1; extern int MA_Fast = 5; extern int MA_Slow = 9; extern int MA_MODE = 1; extern int MA_PRICE_TYPE = 0; int prevbar=0; double regress.ch0,regress.up.ch1,regress.up.ch2,regress.up.ch3,regress.dn.ch1,regress.dn.ch2,regress.dn.ch3; double gj240.ch0,gj240.up.ch1,gj240.up.ch2,gj240.up.ch3,gj240.dn.ch1,gj240.dn.ch2,gj240.dn.ch3; double gj60.ch0,gj60.up.ch1,gj60.up.ch2,gj60.up.ch3,gj60.dn.ch1,gj60.dn.ch2,gj60.dn.ch3; double gj15.ch0,gj15.up.ch1,gj15.up.ch2,gj15.up.ch3,gj15.dn.ch1,gj15.dn.ch2,gj15.dn.ch3; double gu240.ch0,gu240.up.ch1,gu240.up.ch2,gu240.up.ch3,gu240.dn.ch1,gu240.dn.ch2,gu240.dn.ch3; double gu60.ch0,gu60.up.ch1,gu60.up.ch2,gu60.up.ch3,gu60.dn.ch1,gu60.dn.ch2,gu60.dn.ch3; double gu15.ch0,gu15.up.ch1,gu15.up.ch2,gu15.up.ch3,gu15.dn.ch1,gu15.dn.ch2,gu15.dn.ch3; double ea240.ch0,ea240.up.ch1,ea240.up.ch2,ea240.up.ch3,ea240.dn.ch1,ea240.dn.ch2,ea240.dn.ch3; double ea60.ch0,ea60.up.ch1,ea60.up.ch2,ea60.up.ch3,ea60.dn.ch1,ea60.dn.ch2,ea60.dn.ch3; double ea15.ch0,ea15.up.ch1,ea15.up.ch2,ea15.up.ch3,ea15.dn.ch1,ea15.dn.ch2,ea15.dn.ch3; double ej240.ch0,ej240.up.ch1,ej240.up.ch2,ej240.up.ch3,ej240.dn.ch1,ej240.dn.ch2,ej240.dn.ch3; double ej60.ch0,ej60.up.ch1,ej60.up.ch2,ej60.up.ch3,ej60.dn.ch1,ej60.dn.ch2,ej60.dn.ch3; double ej15.ch0,ej15.up.ch1,ej15.up.ch2,ej15.up.ch3,ej15.dn.ch1,ej15.dn.ch2,ej15.dn.ch3; double ec240.ch0,ec240.up.ch1,ec240.up.ch2,ec240.up.ch3,ec240.dn.ch1,ec240.dn.ch2,ec240.dn.ch3; double ec60.ch0,ec60.up.ch1,ec60.up.ch2,ec60.up.ch3,ec60.dn.ch1,ec60.dn.ch2,ec60.dn.ch3; double ec15.ch0,ec15.up.ch1,ec15.up.ch2,ec15.up.ch3,ec15.dn.ch1,ec15.dn.ch2,ec15.dn.ch3; double uc240.ch0,uc240.up.ch1,uc240.up.ch2,uc240.up.ch3,uc240.dn.ch1,uc240.dn.ch2,uc240.dn.ch3; double uc60.ch0,uc60.up.ch1,uc60.up.ch2,uc60.up.ch3,uc60.dn.ch1,uc60.dn.ch2,uc60.dn.ch3; double uc15.ch0,uc15.up.ch1,uc15.up.ch2,uc15.up.ch3,uc15.dn.ch1,uc15.dn.ch2,uc15.dn.ch3; string GJ.240,GJ.60,GJ.15,GU.240,GU.60,GU.15,EA.240,EA.60,EA.15,EC.240,EC.60,EC.15,EJ.240,EJ.60,EJ.15,UC.240,UC.60,UC.15; double gj240,gj60,gj15,gu240,gu60,gu15,ea240,ea60,ea15,ec240,ec60,ec15,ej240,ej60,ej15,uc240,uc60,uc15; string symbol; color colMACDD1,colMACDH1,colMACDH4,colMACDM1,colMACDM5,colMACDM15,colMACDM30,color_m30; color col.gj.240,col.gu.240,col.ea.240,col.ej.240,col.ec.240,col.uc.240; color col.gj.60,col.gu.60,col.ea.60,col.ej.60,col.ec.60,col.uc.60; color col.gj.15,col.gu.15,col.ea.15,col.ej.15,col.ec.15,col.uc.15; //+------------------------------------------------------------------+ //| Custom indicator function | //+------------------------------------------------------------------+ int init() { //---- indicators //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- DeleteMyObjects(OBJ_LABEL); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { //*********************************************************************************************************************** //MACD Signals int counted_bars=IndicatorCounted(); //---- if (turn.comment.off==false) Comment("Attach past regression deviated indicator on 4Hr,1HR,15min TF of atleast one currency pair"); else Comment(""); if (Bars > prevbar) { if (Period()==PERIOD_H4) { Calculate_Regression_ch("GBPJPY",PERIOD_H4); gj240.ch0 = regress.ch0; gj240.dn.ch1 = regress.dn.ch1; gj240.dn.ch2 = regress.dn.ch2; gj240.dn.ch3 = regress.dn.ch3; gj240.up.ch1 = regress.up.ch1; gj240.up.ch2 = regress.up.ch2; gj240.up.ch3 = regress.up.ch3; } // if (Period()==PERIOD_H1) { Calculate_Regression_ch("GBPJPY",PERIOD_H1); gj60.ch0 = regress.ch0; gj60.dn.ch1 = regress.dn.ch1; gj60.dn.ch2 = regress.dn.ch2; gj60.dn.ch3 = regress.dn.ch3; gj60.up.ch1 = regress.up.ch1; gj60.up.ch2 = regress.up.ch2; gj60.up.ch3 = regress.up.ch3; } // if (Period()==PERIOD_M15) { Calculate_Regression_ch("GBPJPY",PERIOD_M15); gj15.ch0 = regress.ch0; gj15.dn.ch1 = regress.dn.ch1; gj15.dn.ch2 = regress.dn.ch2; gj15.dn.ch3 = regress.dn.ch3; gj15.up.ch1 = regress.up.ch1; gj15.up.ch2 = regress.up.ch2; gj15.up.ch3 = regress.up.ch3; } // if (Period()==PERIOD_H4) { Calculate_Regression_ch("GBPUSD",PERIOD_H4); gu240.ch0 = regress.ch0; gu240.dn.ch1 = regress.dn.ch1; gu240.dn.ch2 = regress.dn.ch2; gu240.dn.ch3 = regress.dn.ch3; gu240.up.ch1 = regress.up.ch1; gu240.up.ch2 = regress.up.ch2; gu240.up.ch3 = regress.up.ch3; } // if (Period()==PERIOD_H1) { Calculate_Regression_ch("GBPUSD",PERIOD_H1); gu60.ch0 = regress.ch0; gu60.dn.ch1 = regress.dn.ch1; gu60.dn.ch2 = regress.dn.ch2; gu60.dn.ch3 = regress.dn.ch3; gu60.up.ch1 = regress.up.ch1; gu60.up.ch2 = regress.up.ch2; gu60.up.ch3 = regress.up.ch3; } // if (Period()==PERIOD_M15) { Calculate_Regression_ch("GBPUSD",PERIOD_M15); gu15.ch0 = regress.ch0; gu15.dn.ch1 = regress.dn.ch1; gu15.dn.ch2 = regress.dn.ch2; gu15.dn.ch3 = regress.dn.ch3; gu15.up.ch1 = regress.up.ch1; gu15.up.ch2 = regress.up.ch2; gu15.up.ch3 = regress.up.ch3; } // if (Period()==PERIOD_H4) { Calculate_Regression_ch("EURAUD",PERIOD_H4); ea240.ch0 = regress.ch0; ea240.dn.ch1 = regress.dn.ch1; ea240.dn.ch2 = regress.dn.ch2; ea240.dn.ch3 = regress.dn.ch3; ea240.up.ch1 = regress.up.ch1; ea240.up.ch2 = regress.up.ch2; ea240.up.ch3 = regress.up.ch3; } // if (Period()==PERIOD_H1) { Calculate_Regression_ch("EURAUD",PERIOD_H1); ea60.ch0 = regress.ch0; ea60.dn.ch1 = regress.dn.ch1; ea60.dn.ch2 = regress.dn.ch2; ea60.dn.ch3 = regress.dn.ch3; ea60.up.ch1 = regress.up.ch1; ea60.up.ch2 = regress.up.ch2; ea60.up.ch3 = regress.up.ch3; } // if (Period()==PERIOD_M15) { Calculate_Regression_ch("EURAUD",PERIOD_M15); ea15.ch0 = regress.ch0; ea15.dn.ch1 = regress.dn.ch1; ea15.dn.ch2 = regress.dn.ch2; ea15.dn.ch3 = regress.dn.ch3; ea15.up.ch1 = regress.up.ch1; ea15.up.ch2 = regress.up.ch2; ea15.up.ch3 = regress.up.ch3; } // if (Period()==PERIOD_H4) { Calculate_Regression_ch("EURCHF",PERIOD_H4); ec240.ch0 = regress.ch0; ec240.dn.ch1 = regress.dn.ch1; ec240.dn.ch2 = regress.dn.ch2; ec240.dn.ch3 = regress.dn.ch3; ec240.up.ch1 = regress.up.ch1; ec240.up.ch2 = regress.up.ch2; ec240.up.ch3 = regress.up.ch3; } // if (Period()==PERIOD_H1) { Calculate_Regression_ch("EURCHF",PERIOD_H1); ec60.ch0 = regress.ch0; ec60.dn.ch1 = regress.dn.ch1; ec60.dn.ch2 = regress.dn.ch2; ec60.dn.ch3 = regress.dn.ch3; ec60.up.ch1 = regress.up.ch1; ec60.up.ch2 = regress.up.ch2; ec60.up.ch3 = regress.up.ch3; } // if (Period()==PERIOD_M15) { Calculate_Regression_ch("EURCHF",PERIOD_M15); ec15.ch0 = regress.ch0; ec15.dn.ch1 = regress.dn.ch1; ec15.dn.ch2 = regress.dn.ch2; ec15.dn.ch3 = regress.dn.ch3; ec15.up.ch1 = regress.up.ch1; ec15.up.ch2 = regress.up.ch2; ec15.up.ch3 = regress.up.ch3; } // if (Period()==PERIOD_H4) { Calculate_Regression_ch("EURJPY",PERIOD_H4); ej240.ch0 = regress.ch0; ej240.dn.ch1 = regress.dn.ch1; ej240.dn.ch2 = regress.dn.ch2; ej240.dn.ch3 = regress.dn.ch3; ej240.up.ch1 = regress.up.ch1; ej240.up.ch2 = regress.up.ch2; ej240.up.ch3 = regress.up.ch3; } // if (Period()==PERIOD_H1) { Calculate_Regression_ch("EURJPY",PERIOD_H1); ej60.ch0 = regress.ch0; ej60.dn.ch1 = regress.dn.ch1; ej60.dn.ch2 = regress.dn.ch2; ej60.dn.ch3 = regress.dn.ch3; ej60.up.ch1 = regress.up.ch1; ej60.up.ch2 = regress.up.ch2; ej60.up.ch3 = regress.up.ch3; } // if (Period()==PERIOD_M15) { Calculate_Regression_ch("EURJPY",PERIOD_M15); ej15.ch0 = regress.ch0; ej15.dn.ch1 = regress.dn.ch1; ej15.dn.ch2 = regress.dn.ch2; ej15.dn.ch3 = regress.dn.ch3; ej15.up.ch1 = regress.up.ch1; ej15.up.ch2 = regress.up.ch2; ej15.up.ch3 = regress.up.ch3; } // if (Period()==PERIOD_H4) { Calculate_Regression_ch("USDCAD",PERIOD_H4); uc240.ch0 = regress.ch0; uc240.dn.ch1 = regress.dn.ch1; uc240.dn.ch2 = regress.dn.ch2; uc240.dn.ch3 = regress.dn.ch3; uc240.up.ch1 = regress.up.ch1; uc240.up.ch2 = regress.up.ch2; uc240.up.ch3 = regress.up.ch3; } // if (Period()==PERIOD_H1) { Calculate_Regression_ch("USDCAD",PERIOD_H1); uc60.ch0 = regress.ch0; uc60.dn.ch1 = regress.dn.ch1; uc60.dn.ch2 = regress.dn.ch2; uc60.dn.ch3 = regress.dn.ch3; uc60.up.ch1 = regress.up.ch1; uc60.up.ch2 = regress.up.ch2; uc60.up.ch3 = regress.up.ch3; } // // if (Period()==PERIOD_M15) { Calculate_Regression_ch("USDCAD",PERIOD_M15); uc15.ch0 = regress.ch0; uc15.dn.ch1 = regress.dn.ch1; uc15.dn.ch2 = regress.dn.ch2; uc15.dn.ch3 = regress.dn.ch3; uc15.up.ch1 = regress.up.ch1; uc15.up.ch2 = regress.up.ch2; uc15.up.ch3 = regress.up.ch3; } prevbar = Bars; } if (Period()==PERIOD_H4) { if (MarketInfo("GBPJPY",MODE_ASK) < gj240.dn.ch3) gj240 = 3; else if (MarketInfo("GBPJPY",MODE_ASK) < gj240.dn.ch2) gj240 = 2; else if (MarketInfo("GBPJPY",MODE_ASK) < gj240.dn.ch1) gj240 = 1; if (MarketInfo("GBPJPY",MODE_BID) > gj240.up.ch3) gj240 = 6; else if (MarketInfo("GBPJPY",MODE_BID)> gj240.up.ch2) gj240 = 5; else if (MarketInfo("GBPJPY",MODE_BID) > gj240.up.ch1) gj240 = 4; if (MarketInfo("GBPJPY",MODE_ASK) < gj240.up.ch1 && MarketInfo("GBPJPY",MODE_ASK)> gj240.dn.ch1) gj240 = 0; GlobalVariableSet("gj240",gj240); if (gj240==0) GJ.240="mid"; if (gj240==1) GJ.240="dn1"; if (gj240==2) GJ.240="dn2"; if (gj240==3) GJ.240="dn3"; if (gj240==4) GJ.240="up1"; if (gj240==5) GJ.240="up2"; if (gj240==6) GJ.240="up3"; } else { gj240=GlobalVariableGet("gj240"); if (gj240==0) GJ.240="mid"; if (gj240==1) GJ.240="dn1"; if (gj240==2) GJ.240="dn2"; if (gj240==3) GJ.240="dn3"; if (gj240==4) GJ.240="up1"; if (gj240==5) GJ.240="up2"; if (gj240==6) GJ.240="up3"; } // if (Period()==PERIOD_H1) { if (MarketInfo("GBPJPY",MODE_ASK) < gj60.dn.ch3) gj60 = 3; else if (MarketInfo("GBPJPY",MODE_ASK) < gj60.dn.ch2) gj60 = 2; else if (MarketInfo("GBPJPY",MODE_ASK) < gj60.dn.ch1) gj60 = 1; if (MarketInfo("GBPJPY",MODE_BID) > gj60.up.ch3) gj60 = 6; else if (MarketInfo("GBPJPY",MODE_BID)> gj60.up.ch2) gj60 = 5; else if (MarketInfo("GBPJPY",MODE_BID) > gj60.up.ch1) gj60 = 4; if (MarketInfo("GBPJPY",MODE_ASK) < gj60.up.ch1 && MarketInfo("GBPJPY",MODE_ASK)> gj60.dn.ch1) gj60 = 0; GlobalVariableSet("gj60",gj60); if (gj60==0) GJ.60="mid"; if (gj60==1) GJ.60="dn1"; if (gj60==2) GJ.60="dn2"; if (gj60==3) GJ.60="dn3"; if (gj60==4) GJ.60="up1"; if (gj60==5) GJ.60="up2"; if (gj60==6) GJ.60="up3"; } else { gj60=GlobalVariableGet("gj60"); if (gj60==0) GJ.60="mid"; if (gj60==1) GJ.60="dn1"; if (gj60==2) GJ.60="dn2"; if (gj60==3) GJ.60="dn3"; if (gj60==4) GJ.60="up1"; if (gj60==5) GJ.60="up2"; if (gj60==6) GJ.60="up3"; } // if (Period()==PERIOD_M15) { if (MarketInfo("GBPJPY",MODE_ASK) < gj15.dn.ch3) gj15 = 3; else if (MarketInfo("GBPJPY",MODE_ASK) < gj15.dn.ch2) gj15 = 2; else if (MarketInfo("GBPJPY",MODE_ASK) < gj15.dn.ch1) gj15 = 1; if (MarketInfo("GBPJPY",MODE_BID) > gj15.up.ch3) gj15 = 6; else if (MarketInfo("GBPJPY",MODE_BID)> gj15.up.ch2) gj15 = 5; else if (MarketInfo("GBPJPY",MODE_BID) > gj15.up.ch1) gj15 = 4; if (MarketInfo("GBPJPY",MODE_ASK) < gj15.up.ch1 && MarketInfo("GBPJPY",MODE_ASK)> gj15.dn.ch1) gj15 = 0; GlobalVariableSet("gj15",gj15); } else { gj15=GlobalVariableGet("gj15"); if (gj15==0) GJ.15="mid"; if (gj15==1) GJ.15="dn1"; if (gj15==2) GJ.15="dn2"; if (gj15==3) GJ.15="dn3"; if (gj15==4) GJ.15="up1"; if (gj15==5) GJ.15="up2"; if (gj15==6) GJ.15="up3"; } if (Period()==PERIOD_H4) { if (MarketInfo("GBPUSD",MODE_ASK) < gu240.dn.ch3) gu240 = 3; else if (MarketInfo("GBPUSD",MODE_ASK) < gu240.dn.ch2) gu240 = 2; else if (MarketInfo("GBPJPY",MODE_ASK) < gu240.dn.ch1) gu240 = 1; if (MarketInfo("GBPUSD",MODE_BID) > gu240.up.ch3) gu240 = 6; else if (MarketInfo("GBPUSD",MODE_BID)> gu240.up.ch2) gu240 = 5; else if (MarketInfo("GBPUSD",MODE_BID) > gu240.up.ch1) gu240 = 4; if (MarketInfo("GBPUSD",MODE_ASK) < gu240.up.ch1 && MarketInfo("GBPUSD",MODE_ASK)> gu240.dn.ch1) gu240 = 0; GlobalVariableSet("gu240",gu240); if (gu240==0) GU.240="mid"; if (gu240==1) GU.240="dn1"; if (gu240==2) GU.240="dn2"; if (gu240==3) GU.240="dn3"; if (gu240==4) GU.240="up1"; if (gu240==5) GU.240="up2"; if (gu240==6) GU.240="up3"; } else { gu240=GlobalVariableGet("gu240"); if (gu240==0) GU.240="mid"; if (gu240==1) GU.240="dn1"; if (gu240==2) GU.240="dn2"; if (gu240==3) GU.240="dn3"; if (gu240==4) GU.240="up1"; if (gu240==5) GU.240="up2"; if (gu240==6) GU.240="up3"; } // if (Period()==PERIOD_H1) { if (MarketInfo("GBPUSD",MODE_ASK) < gu60.dn.ch3) gu60 = 3; else if (MarketInfo("GBPUSD",MODE_ASK) < gu60.dn.ch2) gu60 = 2; else if (MarketInfo("GBPJPY",MODE_ASK) < gu60.dn.ch1) gu60 = 1; if (MarketInfo("GBPUSD",MODE_BID) > gu60.up.ch3) gu60 = 6; else if (MarketInfo("GBPUSD",MODE_BID)> gu60.up.ch2) gu60 = 5; else if (MarketInfo("GBPUSD",MODE_BID) > gu60.up.ch1) gu60 = 4; if (MarketInfo("GBPUSD",MODE_ASK) < gu60.up.ch1 && MarketInfo("GBPUSD",MODE_ASK)> gu60.dn.ch1) gu60 = 0; GlobalVariableSet("gu60",gu60); if (gu60==0) GU.60="mid"; if (gu60==1) GU.60="dn1"; if (gu60==2) GU.60="dn2"; if (gu60==3) GU.60="dn3"; if (gu60==4) GU.60="up1"; if (gu60==5) GU.60="up2"; if (gu60==6) GU.60="up3"; } else { gu60=GlobalVariableGet("gu60"); if (gu60==0) GU.60="mid"; if (gu60==1) GU.60="dn1"; if (gu60==2) GU.60="dn2"; if (gu60==3) GU.60="dn3"; if (gu60==4) GU.60="up1"; if (gu60==5) GU.60="up2"; if (gu60==6) GU.60="up3"; } // if (Period()==PERIOD_M15) { if (MarketInfo("GBPUSD",MODE_ASK) < gu15.dn.ch3) gu15 = 3; else if (MarketInfo("GBPUSD",MODE_ASK) < gu15.dn.ch2) gu15 = 2; else if (MarketInfo("GBPUSD",MODE_ASK) < gu15.dn.ch1) gu15 = 1; if (MarketInfo("GBPUSD",MODE_BID) > gu15.up.ch3) gu15 = 6; else if (MarketInfo("GBPUSD",MODE_BID)> gu15.up.ch2) gu15 = 5; else if (MarketInfo("GBPUSD",MODE_BID) > gu15.up.ch1) gu15 = 4; if (MarketInfo("GBPUSD",MODE_ASK) < gu15.up.ch1 && MarketInfo("GBPUSD",MODE_ASK)> gu15.dn.ch1) gu15 = 0; GlobalVariableSet("gu15",gu15); if (gu15==0) GU.15="mid"; if (gu15==1) GU.15="dn1"; if (gu15==2) GU.15="dn2"; if (gu15==3) GU.15="dn3"; if (gu15==4) GU.15="up1"; if (gu15==5) GU.15="up2"; if (gu15==6) GU.15="up3"; } else { gu15=GlobalVariableGet("gu15"); if (gu15==0) GU.15="mid"; if (gu15==1) GU.15="dn1"; if (gu15==2) GU.15="dn2"; if (gu15==3) GU.15="dn3"; if (gu15==4) GU.15="up1"; if (gu15==5) GU.15="up2"; if (gu15==6) GU.15="up3"; } // if (Period()==PERIOD_H4) { if (MarketInfo("EURAUD",MODE_ASK) < ea240.dn.ch3) ea240 = 3; else if (MarketInfo("EURAUD",MODE_ASK) < ea240.dn.ch2) ea240 = 2; else if (MarketInfo("EURAUD",MODE_ASK) < ea240.dn.ch1) ea240 = 1; if (MarketInfo("EURAUD",MODE_BID) > ea240.up.ch3) ea240 = 6; else if (MarketInfo("EURAUD",MODE_BID)> ea240.up.ch2) ea240 = 5; else if (MarketInfo("EURAUD",MODE_BID) > ea240.up.ch1) ea240 = 4; if (MarketInfo("EURAUD",MODE_ASK) < ea240.up.ch1 && MarketInfo("EURAUD",MODE_ASK)> ea240.dn.ch1) ea240 = 0; GlobalVariableSet("ea240",ea240); if (ea240==0) EA.240="mid"; if (ea240==1) EA.240="dn1"; if (ea240==2) EA.240="dn2"; if (ea240==3) EA.240="dn3"; if (ea240==4) EA.240="up1"; if (ea240==5) EA.240="up2"; if (ea240==6) EA.240="up3"; } else { ea240=GlobalVariableGet("ea240"); if (ea240==0) EA.240="mid"; if (ea240==1) EA.240="dn1"; if (ea240==2) EA.240="dn2"; if (ea240==3) EA.240="dn3"; if (ea240==4) EA.240="up1"; if (ea240==5) EA.240="up2"; if (ea240==6) EA.240="up3"; } // if (Period()==PERIOD_H1) { if (MarketInfo("EURAUD",MODE_ASK) < ea60.dn.ch3) ea60 = 3; else if (MarketInfo("EURAUD",MODE_ASK) < ea60.dn.ch2) ea60 = 2; else if (MarketInfo("EURAUD",MODE_ASK) < ea60.dn.ch1) ea60 = 1; if (MarketInfo("EURAUD",MODE_BID) > ea60.up.ch3) ea60 = 6; else if (MarketInfo("EURAUD",MODE_BID)> ea60.up.ch2) ea60 = 5; else if (MarketInfo("EURAUD",MODE_BID) > ea60.up.ch1) ea60 = 4; if (MarketInfo("EURAUD",MODE_ASK) < ea60.up.ch1 && MarketInfo("EURAUD",MODE_ASK)> ea60.dn.ch1) ea60 = 0; GlobalVariableSet("ea60",ea60); if (ea60==0) EA.60="mid"; if (ea60==1) EA.60="dn1"; if (ea60==2) EA.60="dn2"; if (ea60==3) EA.60="dn3"; if (ea60==4) EA.60="up1"; if (ea60==5) EA.60="up2"; if (ea60==6) EA.60="up3"; } else { ea60=GlobalVariableGet("ea60"); if (ea60==0) EA.60="mid"; if (ea60==1) EA.60="dn1"; if (ea60==2) EA.60="dn2"; if (ea60==3) EA.60="dn3"; if (ea60==4) EA.60="up1"; if (ea60==5) EA.60="up2"; if (ea60==6) EA.60="up3"; } // if (Period()==PERIOD_M15) { if (MarketInfo("EURAUD",MODE_ASK) < ea15.dn.ch3) ea15 = 3; else if (MarketInfo("EURAUD",MODE_ASK) < ea15.dn.ch2) ea15 = 2; else if (MarketInfo("EURAUD",MODE_ASK) < ea15.dn.ch1) ea15 = 1; if (MarketInfo("EURAUD",MODE_BID) > ea15.up.ch3) ea15 = 6; else if (MarketInfo("EURAUD",MODE_BID)> ea15.up.ch2) ea15 = 5; else if (MarketInfo("EURAUD",MODE_BID) > ea15.up.ch1) ea15 = 4; if (MarketInfo("EURAUD",MODE_ASK) < ea15.up.ch1 && MarketInfo("EURAUD",MODE_ASK)> ea15.dn.ch1) ea15 = 0; GlobalVariableSet("ea15",ea15); if (ea15==0) EA.15="mid"; if (ea15==1) EA.15="dn1"; if (ea15==2) EA.15="dn2"; if (ea15==3) EA.15="dn3"; if (ea15==4) EA.15="up1"; if (ea15==5) EA.15="up2"; if (ea15==6) EA.15="up3"; } else { ea15=GlobalVariableGet("ea15"); if (ea15==0) EA.15="mid"; if (ea15==1) EA.15="dn1"; if (ea15==2) EA.15="dn2"; if (ea15==3) EA.15="dn3"; if (ea15==4) EA.15="up1"; if (ea15==5) EA.15="up2"; if (ea15==6) EA.15="up3"; } // // if (Period()==PERIOD_H4) { if (MarketInfo("EURCHF",MODE_ASK) < ec240.dn.ch3) ec240 = 3; else if (MarketInfo("EURCHF",MODE_ASK) < ec240.dn.ch2) ec240 = 2; else if (MarketInfo("EURCHF",MODE_ASK) < ec240.dn.ch1) ec240 = 1; if (MarketInfo("EURCHF",MODE_BID) > ec240.up.ch3) ec240 = 6; else if (MarketInfo("EURCHF",MODE_BID)> ec240.up.ch2) ec240 = 5; else if (MarketInfo("EURCHF",MODE_BID) > ec240.up.ch1) ec240 = 4; if (MarketInfo("EURCHF",MODE_ASK) < ec240.up.ch1 && MarketInfo("EURCHF",MODE_ASK)> ec240.dn.ch1) ec240 = 0; GlobalVariableSet("ec240",ec240); if (ec240==0) EC.240="mid"; if (ec240==1) EC.240="dn1"; if (ec240==2) EC.240="dn2"; if (ec240==3) EC.240="dn3"; if (ec240==4) EC.240="up1"; if (ec240==5) EC.240="up2"; if (ec240==6) EC.240="up3"; } else { ec240=GlobalVariableGet("ec240"); if (ec240==0) EC.240="mid"; if (ec240==1) EC.240="dn1"; if (ec240==2) EC.240="dn2"; if (ec240==3) EC.240="dn3"; if (ec240==4) EC.240="up1"; if (ec240==5) EC.240="up2"; if (ec240==6) EC.240="up3"; } // if (Period()==PERIOD_H1) { if (MarketInfo("EURCHF",MODE_ASK) < ec60.dn.ch3) ec60 = 3; else if (MarketInfo("EURCHF",MODE_ASK) < ec60.dn.ch2) ec60 = 2; else if (MarketInfo("EURCHF",MODE_ASK) < ec60.dn.ch1) ec60 = 1; if (MarketInfo("EURCHF",MODE_BID) > ec60.up.ch3) ec60 = 6; else if (MarketInfo("EURCHF",MODE_BID)> ec60.up.ch2) ec60 = 5; else if (MarketInfo("EURCHF",MODE_BID) > ec60.up.ch1) ec60 = 4; if (MarketInfo("EURCHF",MODE_ASK) < ec60.up.ch1 && MarketInfo("EURCHF",MODE_ASK)> ec60.dn.ch1) ec60 = 0; GlobalVariableSet("ec60",ec60); if (ec60==0) EC.60="mid"; if (ec60==1) EC.60="dn1"; if (ec60==2) EC.60="dn2"; if (ec60==3) EC.60="dn3"; if (ec60==4) EC.60="up1"; if (ec60==5) EC.60="up2"; if (ec60==6) EC.60="up3"; } else { ec60=GlobalVariableGet("ec60"); if (ec60==0) EC.60="mid"; if (ec60==1) EC.60="dn1"; if (ec60==2) EC.60="dn2"; if (ec60==3) EC.60="dn3"; if (ec60==4) EC.60="up1"; if (ec60==5) EC.60="up2"; if (ec60==6) EC.60="up3"; } // if (Period()==PERIOD_M15) { if (MarketInfo("EURCHF",MODE_ASK) < ec15.dn.ch3) ec15 = 3; else if (MarketInfo("EURCHF",MODE_ASK) < ec15.dn.ch2) ec15 = 2; else if (MarketInfo("EURCHF",MODE_ASK) < ec15.dn.ch1) ec15 = 1; if (MarketInfo("EURCHF",MODE_BID) > ec15.up.ch3) ec15 = 6; else if (MarketInfo("EURCHF",MODE_BID)> ec15.up.ch2) ec15 = 5; else if (MarketInfo("EURCHF",MODE_BID) > ec15.up.ch1) ec15 = 4; if (MarketInfo("EURCHF",MODE_ASK) < ec15.up.ch1 && MarketInfo("EURCHF",MODE_ASK)> ec15.dn.ch1) ec15 = 0; GlobalVariableSet("ec15",ec15); if (ec15==0) EC.15="mid"; if (ec15==1) EC.15="dn1"; if (ec15==2) EC.15="dn2"; if (ec15==3) EC.15="dn3"; if (ec15==4) EC.15="up1"; if (ec15==5) EC.15="up2"; if (ea15==6) EC.15="up3"; } else { ec15=GlobalVariableGet("ec15"); if (ec15==0) EC.15="mid"; if (ec15==1) EC.15="dn1"; if (ec15==2) EC.15="dn2"; if (ec15==3) EC.15="dn3"; if (ec15==4) EC.15="up1"; if (ec15==5) EC.15="up2"; if (ec15==6) EC.15="up3"; } // if (Period()==PERIOD_H4) { if (MarketInfo("EURJPY",MODE_ASK) < ej240.dn.ch3) ej240 = 3; else if (MarketInfo("EURJPY",MODE_ASK) < ej240.dn.ch2) ej240 = 2; else if (MarketInfo("EURJPY",MODE_ASK) < ej240.dn.ch1) ej240 = 1; if (MarketInfo("EURJPY",MODE_BID) > ej240.up.ch3) ej240 = 6; else if (MarketInfo("EURJPY",MODE_BID)> ej240.up.ch2) ej240 = 5; else if (MarketInfo("EURJPY",MODE_BID) > ej240.up.ch1) ej240 = 4; if (MarketInfo("EURJPY",MODE_ASK) < ej240.up.ch1 && MarketInfo("EURJPY",MODE_ASK)> ej240.dn.ch1) ej240 = 0; GlobalVariableSet("ej240",ej240); if (ej240==0) EJ.240="mid"; if (ej240==1) EJ.240="dn1"; if (ej240==2) EJ.240="dn2"; if (ej240==3) EJ.240="dn3"; if (ej240==4) EJ.240="up1"; if (ej240==5) EJ.240="up2"; if (ej240==6) EJ.240="up3"; } else { ej240=GlobalVariableGet("ej240"); if (ej240==0) EJ.240="mid"; if (ej240==1) EJ.240="dn1"; if (ej240==2) EJ.240="dn2"; if (ej240==3) EJ.240="dn3"; if (ej240==4) EJ.240="up1"; if (ej240==5) EJ.240="up2"; if (ej240==6) EJ.240="up3"; } // if (Period()==PERIOD_H1) { if (MarketInfo("EURJPY",MODE_ASK) < ej60.dn.ch3) ej60 = 3; else if (MarketInfo("EURJPY",MODE_ASK) < ej60.dn.ch2) ej60 = 2; else if (MarketInfo("EURJPY",MODE_ASK) < ej60.dn.ch1) ej60 = 1; if (MarketInfo("EURJPY",MODE_BID) > ej60.up.ch3) ej60 = 6; else if (MarketInfo("EURJPY",MODE_BID)> ej60.up.ch2) ej60 = 5; else if (MarketInfo("EURJPY",MODE_BID) > ej60.up.ch1) ej60 = 4; if (MarketInfo("EURJPY",MODE_ASK) < ej60.up.ch1 && MarketInfo("EURJPY",MODE_ASK)> ej60.dn.ch1) ej60 = 0; GlobalVariableSet("ej60",ej60); if (ej60==0) EJ.60="mid"; if (ej60==1) EJ.60="dn1"; if (ej60==2) EJ.60="dn2"; if (ej60==3) EJ.60="dn3"; if (ej60==4) EJ.60="up1"; if (ej60==5) EJ.60="up2"; if (ej60==6) EJ.60="up3"; } else { ej60=GlobalVariableGet("ej60"); if (ej60==0) EJ.60="mid"; if (ej60==1) EJ.60="dn1"; if (ej60==2) EJ.60="dn2"; if (ej60==3) EJ.60="dn3"; if (ej60==4) EJ.60="up1"; if (ej60==5) EJ.60="up2"; if (ej60==6) EJ.60="up3"; } // if (Period()==PERIOD_M15) { if (MarketInfo("EURJPY",MODE_ASK) < ej15.dn.ch3) ej15 = 3; else if (MarketInfo("EURJPY",MODE_ASK) < ej15.dn.ch2) ej15 = 2; else if (MarketInfo("EURJPY",MODE_ASK) < ej15.dn.ch1) ej15 = 1; if (MarketInfo("EURJPY",MODE_BID) > ej15.up.ch3) ej15 = 6; else if (MarketInfo("EURJPY",MODE_BID)> ej15.up.ch2) ej15 = 5; else if (MarketInfo("EURJPY",MODE_BID) > ej15.up.ch1) ej15 = 4; if (MarketInfo("EURJPY",MODE_ASK) < ej15.up.ch1 && MarketInfo("EURJPY",MODE_ASK)> ej15.dn.ch1) ej15 = 0; GlobalVariableSet("ej15",ej15); if (ej15==0) EJ.15="mid"; if (ej15==1) EJ.15="dn1"; if (ej15==2) EJ.15="dn2"; if (ej15==3) EJ.15="dn3"; if (ej15==4) EJ.15="up1"; if (ej15==5) EJ.15="up2"; if (ea15==6) EJ.15="up3"; } else { ej15=GlobalVariableGet("ej15"); if (ej15==0) EJ.15="mid"; if (ej15==1) EJ.15="dn1"; if (ej15==2) EJ.15="dn2"; if (ej15==3) EJ.15="dn3"; if (ej15==4) EJ.15="up1"; if (ej15==5) EJ.15="up2"; if (ea15==6) EJ.15="up3"; } // if (Period()==PERIOD_H4) { if (MarketInfo("USDCAD",MODE_ASK) < uc240.dn.ch3) uc240 = 3; else if (MarketInfo("USDCAD",MODE_ASK) < uc240.dn.ch2) uc240 = 2; else if (MarketInfo("USDCAD",MODE_ASK) < uc240.dn.ch1) uc240 = 1; if (MarketInfo("USDCAD",MODE_BID) > uc240.up.ch3) uc240 = 6; else if (MarketInfo("USDCAD",MODE_BID)> uc240.up.ch2) uc240 = 5; else if (MarketInfo("USDCAD",MODE_BID) > uc240.up.ch1) uc240 = 4; if (MarketInfo("USDCAD",MODE_ASK) < uc240.up.ch1 && MarketInfo("USDCAD",MODE_ASK)> uc240.dn.ch1) uc240 = 0; GlobalVariableSet("uc240",uc240); if (uc240==0) UC.240="mid"; if (uc240==1) UC.240="dn1"; if (uc240==2) UC.240="dn2"; if (uc240==3) UC.240="dn3"; if (uc240==4) UC.240="up1"; if (uc240==5) UC.240="up2"; if (uc240==6) UC.240="up3"; } else { uc240=GlobalVariableGet("uc240"); if (uc240==0) UC.240="mid"; if (uc240==1) UC.240="dn1"; if (uc240==2) UC.240="dn2"; if (uc240==3) UC.240="dn3"; if (uc240==4) UC.240="up1"; if (uc240==5) UC.240="up2"; if (uc240==6) UC.240="up3"; } // if (Period()==PERIOD_H1) { if (MarketInfo("USDCAD",MODE_ASK) < uc60.dn.ch3) uc60 = 3; else if (MarketInfo("USDCAD",MODE_ASK) < uc60.dn.ch2) uc60 = 2; else if (MarketInfo("USDCAD",MODE_ASK) < uc60.dn.ch1) uc60 = 1; if (MarketInfo("USDCAD",MODE_BID) > uc60.up.ch3) uc60 = 6; else if (MarketInfo("USDCAD",MODE_BID)> uc60.up.ch2) uc60 = 5; else if (MarketInfo("USDCAD",MODE_BID) > uc60.up.ch1) uc60 = 4; if (MarketInfo("USDCAD",MODE_ASK) < uc60.up.ch1 && MarketInfo("USDCAD",MODE_ASK)> uc60.dn.ch1) uc60 = 0; GlobalVariableSet("uc60",uc60); if (uc60==0) UC.60="mid"; if (uc60==1) UC.60="dn1"; if (uc60==2) UC.60="dn2"; if (uc60==3) UC.60="dn3"; if (uc60==4) UC.60="up1"; if (uc60==5) UC.60="up2"; if (uc60==6) UC.60="up3"; } else { uc60=GlobalVariableGet("uc60"); if (uc60==0) UC.60="mid"; if (uc60==1) UC.60="dn1"; if (uc60==2) UC.60="dn2"; if (uc60==3) UC.60="dn3"; if (uc60==4) UC.60="up1"; if (uc60==5) UC.60="up2"; if (uc60==6) UC.60="up3"; } // // if (Period()==PERIOD_M15) { if (MarketInfo("USDCAD",MODE_ASK) < uc15.dn.ch3) uc15 = 3; else if (MarketInfo("USDCAD",MODE_ASK) < uc15.dn.ch2) uc15 = 2; else if (MarketInfo("USDCAD",MODE_ASK) < uc15.dn.ch1) uc15 = 1; if (MarketInfo("USDCAD",MODE_BID) > uc15.up.ch3) uc15 = 6; else if (MarketInfo("USDCAD",MODE_BID)> uc15.up.ch2) uc15 = 5; else if (MarketInfo("USDCAD",MODE_BID) > uc15.up.ch1) uc15 = 4; if (MarketInfo("USDCAD",MODE_ASK) < uc15.up.ch1 && MarketInfo("USDCAD",MODE_ASK)> uc15.dn.ch1) uc15 = 0; GlobalVariableSet("uc15",uc15); if (uc15==0) UC.15="mid"; if (uc15==1) UC.15="dn1"; if (uc15==2) UC.15="dn2"; if (uc15==3) UC.15="dn3"; if (uc15==4) UC.15="up1"; if (uc15==5) UC.15="up2"; if (uc15==6) UC.15="up3"; } else { uc15=GlobalVariableGet("uc15"); if (uc15==0) UC.15="mid"; if (uc15==1) UC.15="dn1"; if (uc15==2) UC.15="dn2"; if (uc15==3) UC.15="dn3"; if (uc15==4) UC.15="up1"; if (uc15==5) UC.15="up2"; if (uc15==6) UC.15="up3"; } // Building First Row if (Corner_of_Chart_RIGHT_TOP == true) { ObjectCreate(Object_ID + "Numbers", OBJ_LABEL, 0, 0, 0); ObjectSetText(Object_ID + "Numbers", "GJ GU EA EC EJ UC", 6, "Tahoma Narrow", BarLabel_color); ObjectSet(Object_ID + "Numbers", OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(Object_ID + "Numbers", OBJPROP_XDISTANCE, 38+Adjust_Side_to_side); ObjectSet(Object_ID + "Numbers", OBJPROP_YDISTANCE, 25+Shift_UP_DN); } if (Corner_of_Chart_RIGHT_TOP == false) { ObjectCreate(Object_ID + "Numbers", OBJ_LABEL, 0, 0, 0); ObjectSetText(Object_ID + "Numbers", "GJ GU EA EC EJ UC", 6, "Tahoma Narrow", BarLabel_color); ObjectSet(Object_ID + "Numbers", OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(Object_ID + "Numbers", OBJPROP_XDISTANCE, 15+Adjust_Side_to_side); ObjectSet(Object_ID + "Numbers", OBJPROP_YDISTANCE, 25+Shift_UP_DN); } ObjectCreate(Object_ID + "H4t", OBJ_LABEL, 0, 0, 0); ObjectSetText(Object_ID + "H4t", "H4", 6, "Tahoma Narrow", BarLabel_color); ObjectSet(Object_ID + "H4t", OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(Object_ID + "H4t", OBJPROP_XDISTANCE, 0+Adjust_Side_to_side); ObjectSet(Object_ID + "H4t", OBJPROP_YDISTANCE, 35+Shift_UP_DN); col.gj.240 = Red; ObjectCreate(Object_ID + "GJ240", OBJ_LABEL, 0, 0, 0); ObjectSetText(Object_ID + "GJ240",GJ.240, 6, "Tahoma Narrow", col.gj.240); ObjectSet(Object_ID + "GJ240", OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(Object_ID + "GJ240", OBJPROP_XDISTANCE, 140+Adjust_Side_to_side); ObjectSet(Object_ID + "GJ240", OBJPROP_YDISTANCE, 35+Shift_UP_DN); col.gu.240 = LightBlue; ObjectCreate(Object_ID + "GU240", OBJ_LABEL, 0, 0, 0); ObjectSetText(Object_ID + "GU240", GU.240, 6, "Tahoma Narrow", col.gu.240); ObjectSet(Object_ID + "GU240", OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(Object_ID + "GU240", OBJPROP_XDISTANCE, 120+Adjust_Side_to_side); ObjectSet(Object_ID + "GU240", OBJPROP_YDISTANCE, 35+Shift_UP_DN); col.ea.240 = Tomato; ObjectCreate(Object_ID + "EA240", OBJ_LABEL, 0, 0, 0); ObjectSetText(Object_ID + "EA240", EA.240, 6, "Tahoma Narrow", col.ea.240); ObjectSet(Object_ID + "EA240", OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(Object_ID + "EA240", OBJPROP_XDISTANCE, 100+Adjust_Side_to_side); ObjectSet(Object_ID + "EA240", OBJPROP_YDISTANCE, 35+Shift_UP_DN); col.ec.240 = LightGreen; ObjectCreate(Object_ID + "EC240", OBJ_LABEL, 0, 0, 0); ObjectSetText(Object_ID + "EC240", EC.240, 6, "Tahoma Narrow", col.ec.240); ObjectSet(Object_ID + "EC240", OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(Object_ID + "EC240", OBJPROP_XDISTANCE, 80+Adjust_Side_to_side); ObjectSet(Object_ID + "EC240", OBJPROP_YDISTANCE, 35+Shift_UP_DN); col.ej.240 = Pink; ObjectCreate(Object_ID + "EJ240", OBJ_LABEL, 0, 0, 0); ObjectSetText(Object_ID + "EJ240", EJ.240, 6, "Tahoma Narrow", col.ej.240); ObjectSet(Object_ID + "EJ240", OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(Object_ID + "EJ240", OBJPROP_XDISTANCE, 60+Adjust_Side_to_side); ObjectSet(Object_ID + "EJ240", OBJPROP_YDISTANCE, 35+Shift_UP_DN); col.uc.240 = Orange; ObjectCreate(Object_ID + "UC240", OBJ_LABEL, 0, 0, 0); ObjectSetText(Object_ID + "UC240", UC.240, 6, "Tahoma Narrow", col.uc.240); ObjectSet(Object_ID + "UC240", OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(Object_ID + "UC240", OBJPROP_XDISTANCE, 40+Adjust_Side_to_side); ObjectSet(Object_ID + "UC240", OBJPROP_YDISTANCE, 35+Shift_UP_DN); //1HR ObjectCreate(Object_ID + "H1t", OBJ_LABEL, 0, 0, 0); ObjectSetText(Object_ID + "H1t", "H1", 6, "Tahoma Narrow", BarLabel_color); ObjectSet(Object_ID + "H1t", OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(Object_ID + "H1t", OBJPROP_XDISTANCE, 0+Adjust_Side_to_side); ObjectSet(Object_ID + "H1t", OBJPROP_YDISTANCE, 55+Shift_UP_DN); col.gj.60 = Red; ObjectCreate(Object_ID + "GJ60", OBJ_LABEL, 0, 0, 0); ObjectSetText(Object_ID + "GJ60",GJ.60, 6, "Tahoma Narrow", col.gj.60); ObjectSet(Object_ID + "GJ60", OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(Object_ID + "GJ60", OBJPROP_XDISTANCE, 140+Adjust_Side_to_side); ObjectSet(Object_ID + "GJ60", OBJPROP_YDISTANCE, 55+Shift_UP_DN); col.gu.60 = LightBlue; ObjectCreate(Object_ID + "GU60", OBJ_LABEL, 0, 0, 0); ObjectSetText(Object_ID + "GU60", GU.60, 6, "Tahoma Narrow", col.gu.60); ObjectSet(Object_ID + "GU60", OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(Object_ID + "GU60", OBJPROP_XDISTANCE, 120+Adjust_Side_to_side); ObjectSet(Object_ID + "GU60", OBJPROP_YDISTANCE, 55+Shift_UP_DN); col.ea.60 = Tomato; ObjectCreate(Object_ID + "EA60", OBJ_LABEL, 0, 0, 0); ObjectSetText(Object_ID + "EA60", EA.60, 6, "Tahoma Narrow", col.ea.60); ObjectSet(Object_ID + "EA60", OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(Object_ID + "EA60", OBJPROP_XDISTANCE, 100+Adjust_Side_to_side); ObjectSet(Object_ID + "EA60", OBJPROP_YDISTANCE, 55+Shift_UP_DN); col.ec.60 = LightGreen; ObjectCreate(Object_ID + "EC60", OBJ_LABEL, 0, 0, 0); ObjectSetText(Object_ID + "EC60", EC.60, 6, "Tahoma Narrow", col.ec.60); ObjectSet(Object_ID + "EC60", OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(Object_ID + "EC60", OBJPROP_XDISTANCE, 80+Adjust_Side_to_side); ObjectSet(Object_ID + "EC60", OBJPROP_YDISTANCE, 55+Shift_UP_DN); col.ej.60 = Pink; ObjectCreate(Object_ID + "EJ60", OBJ_LABEL, 0, 0, 0); ObjectSetText(Object_ID + "EJ60", EJ.60, 6, "Tahoma Narrow", col.ej.60); ObjectSet(Object_ID + "EJ60", OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(Object_ID + "EJ60", OBJPROP_XDISTANCE, 60+Adjust_Side_to_side); ObjectSet(Object_ID + "EJ60", OBJPROP_YDISTANCE, 55+Shift_UP_DN); col.uc.60 = Orange; ObjectCreate(Object_ID + "UC60", OBJ_LABEL, 0, 0, 0); ObjectSetText(Object_ID + "UC60", UC.60, 6, "Tahoma Narrow", col.uc.60); ObjectSet(Object_ID + "UC60", OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(Object_ID + "UC60", OBJPROP_XDISTANCE, 40+Adjust_Side_to_side); ObjectSet(Object_ID + "UC60", OBJPROP_YDISTANCE, 55+Shift_UP_DN); //15Min ObjectCreate(Object_ID + "15Mint", OBJ_LABEL, 0, 0, 0); ObjectSetText(Object_ID + "15Mint", "15Min", 6, "Tahoma Narrow", BarLabel_color); ObjectSet(Object_ID + "15Mint", OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(Object_ID + "15Mint", OBJPROP_XDISTANCE, 0+Adjust_Side_to_side); ObjectSet(Object_ID + "15Mint", OBJPROP_YDISTANCE, 75+Shift_UP_DN); col.gj.15 = Red; ObjectCreate(Object_ID + "GJ15", OBJ_LABEL, 0, 0, 0); ObjectSetText(Object_ID + "GJ15",GJ.15, 6, "Tahoma Narrow", col.gj.15); ObjectSet(Object_ID + "GJ15", OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(Object_ID + "GJ15", OBJPROP_XDISTANCE, 140+Adjust_Side_to_side); ObjectSet(Object_ID + "GJ15", OBJPROP_YDISTANCE, 75+Shift_UP_DN); col.gu.15 = LightBlue; ObjectCreate(Object_ID + "GU15", OBJ_LABEL, 0, 0, 0); ObjectSetText(Object_ID + "GU15", GU.15, 6, "Tahoma Narrow", col.gu.15); ObjectSet(Object_ID + "GU15", OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(Object_ID + "GU15", OBJPROP_XDISTANCE, 120+Adjust_Side_to_side); ObjectSet(Object_ID + "GU15", OBJPROP_YDISTANCE, 75+Shift_UP_DN); col.ea.15 = Tomato; ObjectCreate(Object_ID + "EA15", OBJ_LABEL, 0, 0, 0); ObjectSetText(Object_ID + "EA15", EA.15, 6, "Tahoma Narrow", col.ea.15); ObjectSet(Object_ID + "EA15", OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(Object_ID + "EA15", OBJPROP_XDISTANCE, 100+Adjust_Side_to_side); ObjectSet(Object_ID + "EA15", OBJPROP_YDISTANCE, 75+Shift_UP_DN); col.ec.15 = LightGreen; ObjectCreate(Object_ID + "EC15", OBJ_LABEL, 0, 0, 0); ObjectSetText(Object_ID + "EC15", EC.15, 6, "Tahoma Narrow", col.ec.15); ObjectSet(Object_ID + "EC15", OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(Object_ID + "EC15", OBJPROP_XDISTANCE, 80+Adjust_Side_to_side); ObjectSet(Object_ID + "EC15", OBJPROP_YDISTANCE, 75+Shift_UP_DN); col.ej.15 = Pink; ObjectCreate(Object_ID + "EJ15", OBJ_LABEL, 0, 0, 0); ObjectSetText(Object_ID + "EJ15", EJ.15, 6, "Tahoma Narrow", col.ej.15); ObjectSet(Object_ID + "EJ15", OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(Object_ID + "EJ15", OBJPROP_XDISTANCE, 60+Adjust_Side_to_side); ObjectSet(Object_ID + "EJ15", OBJPROP_YDISTANCE, 75+Shift_UP_DN); col.uc.15 = Orange; ObjectCreate(Object_ID + "UC15", OBJ_LABEL, 0, 0, 0); ObjectSetText(Object_ID + "UC15", UC.15, 6, "Tahoma Narrow", col.uc.15); ObjectSet(Object_ID + "UC15", OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(Object_ID + "UC15", OBJPROP_XDISTANCE, 40+Adjust_Side_to_side); ObjectSet(Object_ID + "UC15", OBJPROP_YDISTANCE, 75+Shift_UP_DN); // End of First Row //*************************************************************************************************************** //---- return(0); } //+------------------------------------------------------------------+ void Calculate_Regression_ch(string symbol,int timeframe) { Print("!! Symbol: ",symbol," ","tf: ",timeframe); regress.ch0 = iCustom(symbol,timeframe,"past regression deviated2",symbol,timeframe,55,0,1); regress.dn.ch3 = iCustom(symbol,timeframe,"past regression deviated2",symbol,timeframe,55,6,1); regress.dn.ch2 = iCustom(symbol,timeframe,"past regression deviated2",symbol,timeframe,55,4,1); regress.dn.ch1 = iCustom(symbol,timeframe,"past regression deviated2",symbol,timeframe,55,2,1); regress.up.ch3 = iCustom(symbol,timeframe,"past regression deviated2",symbol,timeframe,55,5,1); regress.up.ch2 = iCustom(symbol,timeframe,"past regression deviated2",symbol,timeframe,55,3,1); regress.up.ch1 = iCustom(symbol,timeframe,"past regression deviated2",symbol,timeframe,55,1,1); // Print("!!symbol: ",symbol," ","tf: ",timeframe," ","reg ch middle: ",regress.ch0," ","reg up ch1: ",regress.up.ch1," ","reg up ch2: ",regress.up.ch2," ","regress.up.ch3: ",regress.up.ch3," ","regress dn ch1: ",regress.dn.ch1," ","regress dn ch2: ",regress.dn.ch2," ","regress dn ch3: ",regress.dn.ch3); } void DeleteMyObjects(int type) { int objTotal = ObjectsTotal(type); string objName; if (objTotal > 0) { for (int i = objTotal; i >= 0;i--) { objName = ObjectName(i); if (StringFind(objName,Object_ID, 0) >= 0) { ObjectDelete(objName); } } } }