//+------------------------------------------------------------------+//| soubra2003.mq4 |//| Copyright 2016-2018, soubra2003 |//| https://www.mql5.com/en/users/soubra2003 |//+------------------------------------------------------------------+#property copyright"Copyright 2016-2018, Soubra2003"#property link"https://www.mql5.com/en/users/soubra2003/seller"#property version"1.00"#property strictinputENUM_TIMEFRAMES TF=PERIOD_CURRENT; // Time frame /*input*/string InpName="Fibo"; // Line name/*extern*/double InpPrice=0.01; // Line priceinputcolor InpColor=clrRed; // Line colorinputENUM_LINE_STYLE InpStyle=STYLE_DASH; // Line styleinputint InpWidth=1; // Line width/*input*/bool InpBack=false; // Background line/*input*/bool InpSelection=true; // Highlight to move/*input*/bool InpHidden=true; // Hidden in the object list/*input*/long InpZOrder=0; // Priority for mouse click//---//int DigitFactor;double open,high,low,close,candlesize;
//+------------------------------------------------------------------+//| Expert initialization function//+------------------------------------------------------------------+intOnInit()
{
for(int i=0;i<6;i++)
{
HLineCreate(0,InpName+(string)i,0,InpPrice,InpColor,InpStyle,InpWidth,InpBack,InpSelection,InpHidden,InpZOrder);
HLineMove(0,InpName+(string)i,InpPrice);
}
//if(Digits==3) DigitFactor=100;//else if(Digits==5) DigitFactor=10000;//---return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+//| Expert tick function//+------------------------------------------------------------------+voidOnTick()
{
open = iOpen(NULL,TF,1);
high = iHigh(NULL,TF,1);
low = iLow(NULL,TF,1);
close = iClose(NULL,TF,1);
//
candlesize = high-low;
if(candlesize < 0) candlesize=candlesize*(-1);
candlesize = NormalizeDouble(candlesize,Digits);
//---
HLineMove(0,InpName+(string)0,low);
HLineMove(0,InpName+(string)5,high);
//if(close > open) //UP
{
HLineMove(0,InpName+(string)1,high-candlesize*0.236);
HLineMove(0,InpName+(string)2,high-candlesize*0.382);
HLineMove(0,InpName+(string)3,high-candlesize*0.50);
HLineMove(0,InpName+(string)4,high-candlesize*0.618);
}
elseif(close < open) //DOWN
{
HLineMove(0,InpName+(string)1,low+candlesize*0.236);
HLineMove(0,InpName+(string)2,low+candlesize*0.382);
HLineMove(0,InpName+(string)3,low+candlesize*0.50);
HLineMove(0,InpName+(string)4,low+candlesize*0.618);
}
}
//+------------------------------------------------------------------+//| Expert deinitialization function//+------------------------------------------------------------------+voidOnDeinit(constint reason)
{
for(int i=0;i<6;i++)
ObjectDelete(ChartID(),InpName+(string)i);
//---Print("Bye.");
}
//+------------------------------------------------------------------+//| Create the horizontal line |//+------------------------------------------------------------------+bool HLineCreate(constlong chart_ID=0, // chart's ID conststring name="HLine", // line name constint sub_window=0, // subwindow index double price=0, // line price constcolor clr=clrRed, // line color constENUM_LINE_STYLE style=STYLE_SOLID, // line style constint width=1, // line width constbool back=false, // in the background constbool selection=true, // highlight to move constbool hidden=true, // hidden in the object list constlong z_order=0) // priority for mouse click
{
//--- if the price is not set, set it at the current Bid price level if(!price)
price=SymbolInfoDouble(Symbol(),SYMBOL_BID);
//--- reset the error value ResetLastError();
//--- create a horizontal line if(!ObjectCreate(chart_ID,name,OBJ_HLINE,sub_window,0,price))
{
Print(__FUNCTION__,
": failed to create a horizontal line! Error code = ",GetLastError());
return(false);
}
//--- set line color ObjectSetInteger(chart_ID,name,OBJPROP_COLOR,clr);
//--- set line display style ObjectSetInteger(chart_ID,name,OBJPROP_STYLE,style);
//--- set line width ObjectSetInteger(chart_ID,name,OBJPROP_WIDTH,width);
//--- display in the foreground (false) or background (true) ObjectSetInteger(chart_ID,name,OBJPROP_BACK,back);
//--- enable (true) or disable (false) the mode of moving the line by mouse //--- when creating a graphical object using ObjectCreate function, the object cannot be //--- highlighted and moved by default. Inside this method, selection parameter //--- is true by default making it possible to highlight and move the object ObjectSetInteger(chart_ID,name,OBJPROP_SELECTABLE,selection);
ObjectSetInteger(chart_ID,name,OBJPROP_SELECTED,selection);
//--- hide (true) or display (false) graphical object name in the object list ObjectSetInteger(chart_ID,name,OBJPROP_HIDDEN,hidden);
//--- set the priority for receiving the event of a mouse click in the chart ObjectSetInteger(chart_ID,name,OBJPROP_ZORDER,z_order);
//--- successful execution return(true);
}
//+------------------------------------------------------------------+//| Move horizontal line |//+------------------------------------------------------------------+bool HLineMove(constlong chart_ID=0, // chart's ID conststring name="HLine", // line name double price=0) // line price
{
//--- if the line price is not set, move it to the current Bid price level if(!price)
price=SymbolInfoDouble(Symbol(),SYMBOL_BID);
//--- reset the error value ResetLastError();
//--- move a horizontal line if(!ObjectMove(chart_ID,name,0,0,price))
{
Print(__FUNCTION__,
": failed to move the horizontal line! Error code = ",GetLastError());
return(false);
}
//--- successful execution return(true);
}
//+------------------------------------------------------------------+//Bye
你好,Mladen。
能否请您分享包含以下内容的指标。
1) 交易日开盘时的两条水平线
2) 一条线是前XX根蜡烛的高点,另一条是低点
3) 多时间框架
4) 越过横线时有声音、弹出、推送和电子邮件提示。
谢谢。
你好,Mladen。
能否请您分享包含以下内容的指标。
1) 交易日开盘时的两条水平线
2) 一条线是前XX根蜡烛的高点,另一条是低点
3) 多时间框架
4) 越过横线时有声音、弹出、推送和电子邮件提示。
谢谢。
Jea
我没有这样的指标。你可以试试一些被称为 "伦敦突破箱 "或类似的东西(如果我没有弄错的话)。
Jea
我没有这样的指标。你可以试试一些被称为 "伦敦突破箱 "或类似的东西(如果我没弄错的话)。
嗯,谢谢。它最好是一条水平线,而不是一个盒子。
然后在最小值中也是如此,但在下面
附图
然后在最小值中也是如此,但在下面
附图
您是否已经理解了这个棒子的第一个位置上的指示器?
如果我已经在寻找,但我需要的是图片中显示的东西,我不知道是否有可能修改一些,以便在必要的时候能够使用。
如果我已经在寻找,但我需要的是我在图像中显示的东西,我不知道是否有可能修改一些,以便能够在必要时使用它。
谢谢
如果我已经在寻找,但我需要的是图片中显示的东西,我不知道是否有可能修改一些,以便在必要的时候能够使用。
如果我已经在寻找,但我需要的是我在图像中显示的东西,我不知道是否有可能修改一些,以便能够在必要时使用它。
谢谢
修改了程序代码中的行的名称,这样你就可以有更多的突破口连接在一起。
修改了程序代码中的名称,这样就可以有多个连接点了。
我希望这是有帮助的