Сейчас включал DAX, он нормально показывает. Там цена как на es с дробной частью. Может быть проблема с целочисленными значениями цены.
doitagainforme:
Здравствуйте всем.
Есть у меня индикатор HLC BARS, отображает на баре только цену закрытия.
На инструменте ES работает штатно:
А вот dj euro stoxx 50:
полоса цены закрытия стала прямоугольником, соответственно читаемость никакая. Может кто наведёт на путь исправления?
Спасибо.
Вообще индикатор показывает не просто "цены закрытия" а красит бары в соответствии с условиями.
Можно реализовать так
//+------------------------------------------------------------------+ //| HLC BARS.mq4 | //| Copyright © 2008, FOREXflash. | //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property copyright "Copyright © 2008, FOREXflash Software Corp." #property link "http://www.metaquotes.net" #property indicator_chart_window #property indicator_buffers 8 #property indicator_color1 Lime #property indicator_color2 Lime #property indicator_color3 Red #property indicator_color4 Yellow #property indicator_color7 Red #property indicator_color8 Lime #property indicator_width1 6 #property indicator_width2 6 #property indicator_width3 6 #property indicator_width4 6 //---- bar buffer double Buffer1[]; double Buffer2[]; double Buffer5[]; double Buffer6[]; double Buffer7[]; double Buffer8[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init(){ //---- indicators SetIndexBuffer( 0, Buffer5 ); SetIndexBuffer( 1, Buffer6 ); SetIndexBuffer( 2, Buffer7 ); SetIndexBuffer( 3, Buffer8 ); SetIndexBuffer( 6, Buffer1 ); SetIndexBuffer( 7, Buffer2 ); for(int i=0;i<8;i++){ SetIndexEmptyValue(i,0.0); //все буферы == 0,0 SetIndexStyle(i, DRAW_HISTOGRAM); //все буферы DRAW_HISTOGRAM } IndicatorShortName( "HLC BARS" ); //---- return( 0 ); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit(){ return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start(){ int count =IndicatorCounted(); if (Bars < 4*WindowBarsPerChart()){ Alert("Маловато истории, ждемс!"); count = 0;} //---- for (int i = Bars - count-1;i >= 0;i--){ Buffer5[i] = 0; Buffer7[i] = 0; Buffer6[i] = 0; Buffer8[i] = 0; if ((Close[i]>Open[i])) { Buffer5[i] =Close[i]+(WindowPriceMax(0)-WindowPriceMin(0))/5000 ; Buffer6[i] =Close[i] ; Buffer1[i] =Low[i]; Buffer2[i] =High[i]; } if ((Close[i]<Open[i])) { Buffer7[i] =Close[i]+(WindowPriceMax(0)-WindowPriceMin(0))/5000; Buffer8[i] =Close[i] ; Buffer2[i] =Low[i]; Buffer1[i] =High[i]; } } WindowRedraw(); return( 0 ); } //+------------------------------------------------------------------+
Вы упускаете торговые возможности:
- Бесплатные приложения для трейдинга
- 8 000+ сигналов для копирования
- Экономические новости для анализа финансовых рынков
Регистрация
Вход
Вы принимаете политику сайта и условия использования
Если у вас нет учетной записи, зарегистрируйтесь
Здравствуйте всем.
Есть у меня индикатор HLC BARS, отображает на баре только цену закрытия.
На инструменте ES работает штатно:
А вот dj euro stoxx 50:
полоса цены закрытия стала прямоугольником, соответственно читаемость никакая. Может кто наведёт на путь исправления?
Спасибо.