A real question - page 7

 
m100:
Could you write something smarter?
There's no money!
 

And it won't! ))))))))))

===

Jesus... How predictable everything is...

 
Svinozavr:

And it won't! ))))))))))

===

Jesus... How predictable everything is...

And I wanted them back so badly....
 
"Come on, softly, come on, in a half voice, come on, say goodbye laughing..."
 

This variable should be accessed like this:

//+------------------------------------------------------------------+
//|                                                 Мой советник.mq4 |
//|                                          Copyright © 2010, Drknn |
//|                                                    drknn@mail.ru |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2010, Drknn"
#property link      "drknn@mail.ru"

string          NameExpert="Мой советник";
// ------------- Пользовательские переменные ------------------------
extern int PeriodSkolzjaschej=56;// период усреднения простой скользящей средней
extern string C1="---------------- Параметры индикатора MACD ---------------------";
extern int fast_ema_period=12;
extern int slow_ema_period=26;
extern int signal_period=9;
extern int applied_price=12;// Ставить от 0 до 6


// ------------- Вспомогательные переменные -------------------------
string    SMB;
double          MyValue,Main_MACD,Signal_MACD;

//+------------------------------------------------------------------+
//|                  Блок инициализации                              |
//+------------------------------------------------------------------+
int init(){
  SMB=Symbol();
        
        return(0);
}
//+------------------------------------------------------------------+
//|                  Блок деинициализации                            |
//+------------------------------------------------------------------+
int deinit(){
        if (!IsTesting()){
    Comment("");
    Print("Советник деинициализирован (выключен совсем)");
  }
  return(0);
}
//+------------------------------------------------------------------+
//|                  Старт работы советника                          |
//+------------------------------------------------------------------+
int start(){
        
        MyValue=0;
        // --------- показания индикатора на нулевой свече -----------
        Main_MACD=iMACD(SMB,0,fast_ema_period,slow_ema_period,signal_period,0,0,0);
        Main_MACD=NormalizeDouble(Main_MACD,Digits);
        Signal_MACD=iMACD(SMB,0,fast_ema_period,slow_ema_period,signal_period,0,1,0);
        Signal_MACD=NormalizeDouble(Signal_MACD,Digits);
        // ------- Усредняем сигнальную линию ------------------
        for(int i=PeriodSkolzjaschej;i>=0;i--){
         MyValue=MyValue+iMACD(SMB,0,fast_ema_period,slow_ema_period,signal_period,0,1,i);
        }
        MyValue=MyValue/(PeriodSkolzjaschej+1);
        MyValue=NormalizeDouble(MyValue,Digits);
        return(0);
}
//+------------------------------------------------------------------+
//|                  Пользовательские подпрограммы                   |
//+------------------------------------------------------------------+


 
drknn:

This variable has to be accessed like this:


all cool of course, thanks, but you just wrote MACD(12,26,9) now, and what I need you didn't understand again...

I have indicator window, MACD(14,7,1) on it I put a simple 35 wristwatch with previous indikator data method, the last candle data is in the "Data window", the Expert Advisor doesn't need to calculate anything, it just needs the number in the black square, since the wizard is standard, I can't access its code and make the last bar a global variable, if I take the wizard from the Code Base I cannot apply previous indikator data method, since the indicator is custom

Are there any functions or procedures that work with "Data window"?

 
nothing else to say?
 

No, you misunderstood me - I summed the MACD and averaged it with a 56 period moving average. I did exactly what you wanted. You need a different averaging period and a different MACD - no problem - these settings are placed in user variables. Set what you need.

Your task is fully completed by me. And let them tell me if I failed.

 
m100:...

The data of the last candle is in the "Data window",

The data of the last (and any other) candlestick is located through the iOpen(), iClose(), iLow() and iHigh() time series

or Open[], Close[], Low[], High[] for the current symbol.

 
goldtrader:
The data of the last (and any other) candle is found through the iOpen(), iClose(), iLow() and iHigh() time series

It has highlighted the right value in the screenshot. The MA indicator reading is highlighted there.
Reason: