Hi all. Can anyone tell me where to get a tick indicator that would hold a vertical, horizontal and trend line attached? The indicators posted on the forum can't do this.
Question to experts, is there a ready-made arrow indicator, which shows the intersection of the wrist with Fibo levels, and if not, is it possible to implement it, for example, from ready-made SpudFibo?
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.
How do I do this? What do I need to replace in this MACD code?
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 DarkKhaki
#property indicator_color2 Red
#property indicator_width1 2
//---- indicator parameters
extern int FastEMA=12;
extern inttern SlowEMA=26;
extern inttern SignalSMA=9;
//---- indicator buffers
double MacdBuffer[];
double SignalBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialisation function |
//+------------------------------------------------------------------+
int init()
{
//---- drawing settings
SetIndexStyle(0,DRAW_HISTOGRAM);
SetIndexStyle(1,DRAW_LINE);
SetIndexDrawBegin(1,SignalSMA);
IndicatorDigits(Digits+1);
//---- indicator buffers mapping
SetIndexBuffer(0,MacdBuffer);
SetIndexBuffer(1,SignalBuffer);
//---- name for DataWindow and indicator subwindow label
IndicatorShortName("USDJPY("+FastEMA+", "+SlowEMA+", "+SignalSMA+")");
SetIndexLabel(0, "MACD");
SetIndexLabel(1, "Signal");
//---- initialization done
return(0);
}
//+------------------------------------------------------------------+
//| Moving Averages Convergence/Divergence |
//+------------------------------------------------------------------+
int start()
{
int limit;
int counted_bars=IndicatorCounted();
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
//---- macd counted in the 1-st buffer
for(int i=0; i<limit; i++)
MacdBuffer[i]=iMA("USDJPY",0,FastEMA,0,MODE_EMA,PRICE_CLOSE,i)-iMA("USDJPY",0,SlowEMA,0,MODE_EMA,PRICE_CLOSE,i);
//---- signal line counted in the 2nd buffer
for(i=0; i<limit; i++)
SignalBuffer[i]=iMAOnArray(MacdBuffer,Bars,SignalSMA,0,MODE_SMA,i);
//---- done
return(0);
}
//+------------------------------------------------------------------+
A little later. Not now
Can you tell me who's clever - how do I declare a function that returns an array?
int fxName[] (int p1, int p2) {
...
}
doesn't want to understand
Tell me who's clever - how do you declare a function that returns an array?
It's better this way:
Better like this:
int& is it like by reference?
You can. And there are examples. I have one of those in my toys.
Is there any way you can be more specific?
I guess I just need some advice on how to do it, not some complicated help ...? )
Is there any way you can be more specific?
I take it I just need some advice on how to do it, not some complicated help ...? )
https://forum.mql4.com/ru/12535 Here you can look up the code in one of the experts.
Can you tell me if anyone has encountered a fractal-based slider, maybe like envelopes, I'd be very grateful...