- Помогите под править индук , удаляет все графические линии при смене тайм -фрема" Session "
- заменить линию на квадрат
- заменить линию на квадрат
//+------------------------------------------------------------------+ //| Time_Line.mq4 | //| Yuriy Tokman (YTG) | //| https://ytg.com.ua | //+------------------------------------------------------------------+ #property copyright "Yuriy Tokman (YTG)" #property link "https://ytg.com.ua" #property version "1.00" #property strict #property indicator_chart_window input int BBars=0; input int TOS=8; input color ColorTOS=Lime; input int TCS=13; input color ColorTCS=Red; input int TOT=0; input color ColorTOT=Black; input int TCT=0; input color ColorTCT=Black; input int TOL=0; input color ColorTOL=Black; input int TCL=0; input color ColorTCL=Black; input int TON=0; input color ColorTON=Black; input int TCN=0; input color ColorTCN=Black; input string TL="TL"; int bBars=0; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- indicator buffers mapping bBars = BBars; //--- return(INIT_SUCCEEDED); } int deinit(){ ObjectsDeleteAll(0,OBJ_VLINE); return(0);} //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { //--- if(bBars<=0)bBars=Bars; for(int i=0;i<bBars;i++) {Time_V_Line( TOS, i, ColorTOS); Time_V_Line( TCS, i, ColorTCS); Time_V_Line( TOT, i, ColorTOT); Time_V_Line( TCT, i, ColorTCT); Time_V_Line( TOL, i, ColorTOL); Time_V_Line( TCL, i, ColorTCL); Time_V_Line( TON, i, ColorTON); Time_V_Line( TCN, i, ColorTCN); } //--- return value of prev_calculated for next call return(rates_total); } //+------------------------------------------------------------------+ void Time_V_Line( int TIME, int Sdvig, color COLOR) { if(TimeHour( Time[Sdvig])==TIME && TimeMinute( Time[Sdvig])==0 ) { string sTL=TL+(string)TIME+" "+(string)Sdvig; ObjectCreate(sTL, OBJ_VLINE, 0, Time[Sdvig], 0); ObjectSet( sTL, OBJPROP_COLOR, COLOR); WindowRedraw(); } return; }
Iurii Tokman:
Большое спасибо!
Ivan Romash:
Большое спасибо!
пжлст
Вы упускаете торговые возможности:
- Бесплатные приложения для трейдинга
- 8 000+ сигналов для копирования
- Экономические новости для анализа финансовых рынков
Регистрация
Вход
Вы принимаете политику сайта и условия использования
Если у вас нет учетной записи, зарегистрируйтесь