Cześć chłopaki,
Używam funkcji iMAOnArray, ale nie mogę uzyskać następującego wskaźnika, aby uzyskać wyjście. Okno wskaźnika, które przeciągnęłam, pozostanie puste.
Każda pomoc doceniona.
pozdrowienia
Steve
// ----------------------------------------------- -------------------
//| iMAOnArray.mq4 |
//| Guru koderów |
//|
http://www.metatrader.info|
// ----------------------------------------------- -------------------
#property copyright Koder Guru
#property link http://www.metatrader.info
#property indior_separate_window
#property indior_color1 LawnGreen
Kolor wskaźnika #property 2 Ciemnoniebieski
double ExtMapBuffer1 [];
double RSI_Val [];
podwójne RSI_Val_SMA [];
int init ()
{
IndiorDigits (MarketInfo (Symbol (), MODE_DIGITS));
SetIndexStyle (0, DRAW_LINE);
SetIndexBuffer (0, ExtMapBuffer1);
return (0);
}
int deinit ()
{
return (0);
}
int start ()
{
int bar, limit;
int counted_bars = IndiorCounted ();
if (counted_barslt; 0) return (-1);
if (counted_barsgt; 0) counted_bars--;
limit = Bars-IndiorCounted ();
for (bar = 0; barlt; limit; bar )
RSI_Val [bar] = iCustom (NULL, 0, RSI, 0,0, bar);
for (bar = 0; barlt; limit; bar )
RSI_Val_SMA [bar] = iMAOnArray (RSI_Val, Bars, 5,0, MODE_SMA, bar);
for (bar = 0; barlt; limit; bar ) {
if (RSI_Val [bar] gt; RSI_Val_SMA [bar])
ExtMapBuffer1 [bar] = 1;
jeszcze
ExtMapBuffer1 [bar] = 0;
}
return (0);
}