Скачать MetaTrader 5

Помогите под править индук , удаляет все графические линии при смене тайм -фрема" Session "

Авторизуйтесь или зарегистрируйтесь, чтобы добавить комментарий
Forex Trader
114269
Forex Trader  
//+------------------------------------------------------------------+
//| time1.mq4 |
//| Copyright © 2005, MetaQuotes Software Corp. |
//| https://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2005, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"

#property indicator_chart_window
string t="";


extern int Open_London=7;
extern int Close_London_Open_USD=15;
extern int Close_USD=22;
extern int CountBars=500;



//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
//---- TODO: add your code here

{


ObjectsDeleteAll("t");


}
//----
return(0);

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+

int start()
{

int i;
i=CountBars-1;
while(i>0)
{
t=DoubleToStr(i,0);
if(TimeMinute(Time[i])==0&&TimeHour(Time[i])==Open_London)
{

ObjectCreate(t, OBJ_ARROW, 0, Time[i], High[i]+Point*10);
//Print(t,Time[i]);W,
ObjectSet(t, OBJPROP_ARROWCODE,81);
ObjectSet(t, OBJPROP_COLOR , Yellow);
//ObjectSet(t, OBJPROP_TIMEFRAMES, OBJ_PERIOD_H1);
ObjectsRedraw();

}
if(TimeMinute(Time[i])==0&&TimeHour(Time[i])==Close_London_Open_USD)
{

ObjectCreate(t, OBJ_ARROW, 0, Time[i], Low[i]-Point*10);
//Print(t,Time[i]);

ObjectSet(t, OBJPROP_ARROWCODE, 88);
ObjectSet(t, OBJPROP_COLOR , Red);
//ObjectSet(t, OBJPROP_TIMEFRAMES, OBJ_PERIOD_H1);
ObjectsRedraw();




}
if(TimeMinute(Time[i])==0&&TimeHour(Time[i])==Close_USD)
{

ObjectCreate(t, OBJ_ARROW, 0, Time[i], Close[i]-Point*20);

ObjectSet(t, OBJPROP_ARROWCODE, 90);
ObjectSet(t, OBJPROP_COLOR , Aqua);
ObjectSet(t, OBJPROP_WIDTH , 1);
ObjectsRedraw();
}
i--;
}

{
int counted_bars=IndicatorCounted();
}}
//----
return(0);
//+------------------------------------------------------------------+
Forex Trader
114269
Forex Trader  
//+------------------------------------------------------------------+
//| time1.mq4 |
//| Copyright © 2005, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2005, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"

#property indicator_chart_window
string t="";


extern int Open_London=7;
extern int Close_London_Open_USD=15;
extern int Close_USD=22;
extern int CountBars=500;



//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit() 
//---- TODO: add your code here

{


//ObjectsDeleteAll("t");


}
//----
return(0);

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+

int start()
{

int i;
i=CountBars-1;
while(i>0)
{
t=DoubleToStr(i,0);
if(TimeMinute(Time[i])==0&&TimeHour(Time[i])==Open_London)
{

ObjectCreate(t, OBJ_ARROW, 0, Time[i], High[i]+Point*10);
//Print(t,Time[i]);W,
ObjectSet(t, OBJPROP_ARROWCODE,81);
ObjectSet(t, OBJPROP_COLOR , Yellow);
//ObjectSet(t, OBJPROP_TIMEFRAMES, OBJ_PERIOD_H1);
ObjectsRedraw();

}
if(TimeMinute(Time[i])==0&&TimeHour(Time[i])==Close_London_Open_USD)
{

ObjectCreate(t, OBJ_ARROW, 0, Time[i], Low[i]-Point*10);
//Print(t,Time[i]);

ObjectSet(t, OBJPROP_ARROWCODE, 88);
ObjectSet(t, OBJPROP_COLOR , Red);
//ObjectSet(t, OBJPROP_TIMEFRAMES, OBJ_PERIOD_H1);
ObjectsRedraw();




}
if(TimeMinute(Time[i])==0&&TimeHour(Time[i])==Close_USD)
{

ObjectCreate(t, OBJ_ARROW, 0, Time[i], Close[i]-Point*20);

ObjectSet(t, OBJPROP_ARROWCODE, 90);
ObjectSet(t, OBJPROP_COLOR , Aqua);
ObjectSet(t, OBJPROP_WIDTH , 1);
ObjectsRedraw();
}
i--;
}

{
int counted_bars=IndicatorCounted();
}}
//----
return(0);
//+------------------------------------------------------------------+
Авторизуйтесь или зарегистрируйтесь, чтобы добавить комментарий