[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 517

 
valenok2003:


thanks, that was clear, i.e. if a variable or array is described at a higher level, you can reference its address back and forth as much as you like

Right.
 

Good evening.

I'm a bit of a "crucian" when it comes to coding :) I am building an Expert Advisor based on Fibonacci indicator. I am not paying attention to the strategy so far. My problem is 7 Fibonacci levels, how to make each level crossed by 2 different pending orders and no more.

I would appreciate any tips.

Sorry for my awkward russian.

Files:
 

 Просто, объявить типы переменных в специальной функции start и проконтролировать, чтобы они были инициализированы. Рекомендую "старорежимный" подход: сначала - декларации, после - процедуры.

Alexei, how is it to control the initialisation of variables? I don't really understand it.

By the way, I understood everything about passing parameters by reference. In fact, only parameters not types of variables are passed. The calling function doesn't know anything aboutcalled types. That's why you must declare the type of called variables inside the calling function. I found this in a C book, one of the ones I have.

 
Hello. Can you tell me how I can get the value of the indicator on H3 timeframe in the EA program. The iMACD(...) function only works with standard periods.
 

zdrastvuite fsem .zcajite pajalusta esli mojete,.......ia instalmeta trader4+sovetnic EX4 .i nimagu naciati targavati,pravo vniz pacazivaet NETSVIAZI.scazite liudi dobrie sto delati jdu atves s uvajenie

 
aladyn:

zdrastvuite fsem .zcajite pajalusta esli mojete,.......ia instal meta trader4+sovetnic EX4 .i nimagu naciati targavati,pravo vniz pacazivaet NETSVIAZI.scazite liudi dobrie sto delati jdu atves s uvajenie


If you have any respect, download the Russian font! You can get it all on Google!
 
oleg_:
Hello. Can you tell me how I can get the value of an indicator on H3 timeframe in the EA program. The iMACD(...) function only works with standard periods.


Use a multiple of periods.

e.g. for H1

extern int FastEMA=12;
extern int SlowEMA=26;
extern int SignalSMA=9;

if you want the same values for H3

set it on H1

extern int FastEMA=36;
extern int SlowEMA=78;
extern int SignalSMA=27;

does not work for all indices,

Appendix: Example of a stochastic implementation for an arbitrary TF

Files:
 

An acquaintance claims the following:

"I only trade intraday now and only in the real market, the Chicago Stock Exchange, so I don't use MT4 or MT5 and generally try to forget about them like a bad dream. "

What are the differences?

 

Hi all!

Please help me write this indicator.

I want it to show min and max for the last n number of bars.

I've started to write the code, but I can't figure out how to write the logic correctly.

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Red
//--- buffers
double Line_1[];
double Line_2[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2);
   SetIndexBuffer(0,Line_1);
   SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,2);
   SetIndexBuffer(1,Line_2);
//----
   return;
  }

int start()
  {
   int    counted_bars=IndicatorCounted();
 
yosuf:

An acquaintance claims the following:

"I only trade intraday now and only in the real market, the Chicago Stock Exchange, so I don't use MT4 or MT5 and generally try to forget about them like a bad dream. "

What are the differences?



The gangsters there are cooler.

By the way, why don't you ask your friend? Why don't you ask your friend?

Reason: