MetaTrader 4 Client Terminal build 610 - page 12

 
angevoyageur:

Ok. I compile the indicator you provide with MT4 509. Then I copy this .ex4 to the right folder on new build. And I run the indicator...then I open the Offline chart (EURUSD, which was there).

But this chart has only 1 bar, is it normal ?



Let me know, there is a way to use an older version of mt4 on live trading?
 
mrangelo:

Hi, this bar is working in real time? At the same price movements than the TF chart? If Yes, it's very good, it means indicator is working properly.

About the bar, the renko bar, as you should know, is a bar independent for time to be built ok? as you recently installed it, the bar is loaded only at this time you put, it means, only now.. To have a considerable chart, you must let mt4 runs for some time.. In more volatile instruments, more bars we have.. got it?

Yes I know the principle, what never use it practically. It's clear.

But I learned how to built a considerable chart through the time I use this indicator.

On Option menu > chart tab > Max bars in chart and Max bar on history put the biggest number you can (9999999....) (When you close the menu, mt4 will left with the max. bar allowed)

Then you go on the m1 chart where indicator is attached, deselect auto chart scroll and scroll manually charts backwards (if you zoom it out, it's easier), until allowed by mt4. Than you attach the indicator again and open the offline chart.. you should have a correct / considerable chart.

I attached to .ex4, try it and let me know. I suppose you know how to put it on the right place ?
 
angevoyageur:
Yes I know the principle, what never use it practically. It's clear.
I attached to .ex4, try it and let me know. I suppose you know how to put it on the right place ?

\o/ YEAH!

It's working nicely! Man... you saved my life.

It seems working properly now, I've been observed that the indicator box is in that older format, with no that About and Dependencies tabs..

Well, thank you very much! I'm sorry if I was a kind of rude in some posts, was not my intention...

Have a nice trading!

Angelo

 


Ok so I guess and I do mean guess that what this means is.....

Or is there a fabs() function that is not in the help file yet... because if you click on fabs it goes no where..

 
mrangelo:

\o/ YEAH!

It's working nicely! Man... you saved my life.

It seems working properly now, I've been observed that the indicator box is in that older format, with no that About and Dependencies tabs..

Well, thank you very much! I'm sorry if I was a kind of rude in some posts, was not my intention...

Have a nice trading!

Angelo

Don't worry. You are welcome.

 
Jimdandy:


Ok so I guess and I do mean guess that what this means is.....

Or is there a fabs() function that is not in the help file yet... because if you click on fabs it goes no where..

I believe it is a shortened name for the function all the math functions now appear to have those short names you can use if you want to like in mql5.
 
angevoyageur:

You are right about OnStart() vs OnTick()..., but :

Same for OnDeinit().

It is correct information for the MT5.

But in the MT4 scripts can run init and deinit functions. Such behavior was in the MT4 always and we will not change it

Of course init function is useless for scripts. But deinit can be useful - start breaks its running by stop-flag, then deinit makes finish steps

 
stringo:

It is correct information for the MT5.

But in the MT4 scripts can run init and deinit functions. Such behavior was in the MT4 always and we will not change it

Of course init function is useless for scripts. But deinit can be useful - start breaks its running by stop-flag, then deinit makes finish steps


Then the documentation has to be corrected, what I reported here is from mql4 documentation.

See https://docs.mql4.com/en/basis/function/events it's write there that OnInit() and OnDeinit() are NOT called for scripts.

 

I think stringo was referring to the old mql4 init() and deinit() the docs refer to the new OnInit() and OnDeinit().

 
SDC:

I think stringo was referring to the old mql4 init() and deinit() the docs refer to the new OnInit() and OnDeinit().

Nope. I just check.

int OnInit()
  {
   Print(__FUNCTION__);
   return(INIT_SUCCEEDED);
  }
void OnStart()
  {
//---
   Print(__FUNCTION__);
  }
void OnDeinit(const int reason)
  {
   Print(__FUNCTION__);   
   
  }
OnInit and OnDeinit are executed. Documentation needs to be corrected.
Reason: