mladen: ¿Ha comprobado el indicador desde el primer puesto de esta banda de rodadura?
Hello
Si ya lo estaba buscando, pero lo que necesito es lo que muestro en la imagen, no sé si sería posible modificar algunos para ser capaz de utilizarlo en el momento necesario
If I was already looking but what I need is what I show in the image, I do not know if it would be possible to modify some to be able to use it at the necessary
Si ya lo estaba buscando, pero lo que necesito es lo que muestro en la imagen, no sé si sería posible modificar algunos para ser capaz de utilizarlo en el momento necesario
If I was already looking but what I need is what I show in the image, I do not know if it would be possible to modify some to be able to use it at the necessary
thank
As far as I remember some are doing exactly what you need. Please do check them out
//+------------------------------------------------------------------+//| 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
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hi Mladen,
Can you please share the indicator which contains following:
1) two horizontal lines at the opening of a trading day
2) One line being the high and another being low of the first XX candles
3) multi time frame
4) Alert with sound, popup, push and email on crossing the lines.
Thanks.
Hi Mladen,
Can you please share the indicator which contains following:
1) two horizontal lines at the opening of a trading day
2) One line being the high and another being low of the first XX candles
3) multi time frame
4) Alert with sound, popup, push and email on crossing the lines.
Thanks.
Jea
I don't have such an indicator. You might try some that are called "London breakout boxes" or something similar (if I am not mistaken)
Jea
I don't have such an indicator. You might try some that are called "London breakout boxes" or something similar (if I am not mistaken)
Well Thanks. It would be better a horizontal line rather than a box.
And then in the Minimum the same but below
Attached image
And then in the Minimum the same but below
Attached image
¿Ha comprobado el indicador desde el primer puesto de esta banda de rodadura?
Si ya lo estaba buscando, pero lo que necesito es lo que muestro en la imagen, no sé si sería posible modificar algunos para ser capaz de utilizarlo en el momento necesario
If I was already looking but what I need is what I show in the image, I do not know if it would be possible to modify some to be able to use it at the necessary
thank
Si ya lo estaba buscando, pero lo que necesito es lo que muestro en la imagen, no sé si sería posible modificar algunos para ser capaz de utilizarlo en el momento necesario
If I was already looking but what I need is what I show in the image, I do not know if it would be possible to modify some to be able to use it at the necessary
thank
Have changed the name of line in programcode so u can have more breakout attached at
changed the name in program code so its possible to have more than 1 atached
I hope this is helpful