Indicators on a chart...

JTrader

Guest
Messages
5,741
Likes
507
1)
in MT4 has anyone come across any kind of indicator that causes a time lag when you then try and do things to the chart - such as scroll through it, move the cross hair cursor, add shapes or objects like arrows, thumbs up, thumbs down, check sign, stop sign etc.

I'm talking about any delay between what you are trying to do with your mouse, and MT4 actually processing this info and doing this???

I have a custom indicator where this is occurring. The lag varies from a fraction of a second, to several seconds. On M1 the lag tends to be the worst. But it does happen with i.e. with 4 charts open - M5,M15,M30,H1.


2)
Also, when you add objects to a chart such as trendlines, horizontal and vertical lines, shapes and objests etc. then close MT4 and reopen it. MT4 saves the changes.

Has anyone come across an indicator before that either -
A) allows you to add such objects to a chart, but they then disappear after a few seconds.


And/Or

B) allows you to add such objects to a chart, and they stay there until MT4 closes. But then when MT4 is reopened, the objects disappear.


I have only ever come across phenomenons 1 & 2 with one single MT4 custom indicator.
What about you? have you experienced these things before with an MT4 indicator/s?
if so, with how many MT4 indicators (i.e. 1 or several)?


If anyone knows a bit more about MT4 programming. What coding issues cause scenarios 1 & 2 ?

Thanks a lot.
 
Last edited:
Without the code it is hard to comment, but both sound like poor programming techniques to me.

1) Will probably be due to how it is processing the bars. Some indicators will go through every bar again each time they run. This can cause delays and unless absolutely necessary the indicator should only process the current bar.

2) Objects get deleted/initialised in the init/deinit functions. So they could be being deleted and then are not being created again properly because of some bug.
 
When i open the MetaEditor in any of my MT4's, i cannot see any of my custom indicators listed.
In the indicators folder, it is just all the default indictors that are inbuilt in MT4.

IN MetaEditor, how do i get to my custom indicators, in order to edit the code?

Cheers.
 
Do you definitely have the source code? That is where you would find them. You could just have the binary files in which case you cannot modify the indicator.
 
You neede to open the editor. If you look in the main toolbar there's a button that says "expert advisors", to the left of that is a small diamond shaped yellow diamond with an exclamation mark on it. click that and the editor will open.

you can then open the custom indicator, and compile it

alternatively if you navigate to the indicaators directory, the custom indicators can be opened by double clicking on them (they should show as the same yellow diamond icons)

hope this helps
 
Do you definitely have the source code? That is where you would find them. You could just have the binary files in which case you cannot modify the indicator.

Is the MQ4 file the source code?

While an ex4 file is just the binary file?


For some of the custom indicators i have the MQ4 file, (and if i didnt have both file types in the first place) and then when you run it/verify the code, you get the EX4 file (i think).

However, none of the custom indicators are showing up in the Meta Editor.

I can see all custom inds. in MT4 - Insert - Indicators - Custom.


Should you put custom indicators into the - program files - experts - indicators (folder)??

This is where i put them.

Ta.
 
You neede to open the editor. If you look in the main toolbar there's a button that says "expert advisors", to the left of that is a small diamond shaped yellow diamond with an exclamation mark on it. click that and the editor will open.

you can then open the custom indicator, and compile it

alternatively if you navigate to the indicaators directory, the custom indicators can be opened by double clicking on them (they should show as the same yellow diamond icons)

hope this helps

MetaEditor-Open-local disk C - Program Files - epxperts- indicators -

All the customs inds. i had MQ4 file for were listed there, and i could open them (y)

Afterwards - metaeditor - navigator - indicators - this now displayed all my custom indicators that i have MQ4 files for. i could open them here also. (y)

Cheers chaps.
 
1)
in MT4 has anyone come across any kind of indicator that causes a time lag when you then try and do things to the chart - such as scroll through it, move the cross hair cursor, add shapes or objects like arrows, thumbs up, thumbs down, check sign, stop sign etc.

I'm talking about any delay between what you are trying to do with your mouse, and MT4 actually processing this info and doing this???

I have a custom indicator where this is occurring. The lag varies from a fraction of a second, to several seconds. On M1 the lag tends to be the worst. But it does happen with i.e. with 4 charts open - M5,M15,M30,H1.


2)
Also, when you add objects to a chart such as trendlines, horizontal and vertical lines, shapes and objests etc. then close MT4 and reopen it. MT4 saves the changes.

Has anyone come across an indicator before that either -
A) allows you to add such objects to a chart, but they then disappear after a few seconds.


And/Or

B) allows you to add such objects to a chart, and they stay there until MT4 closes. But then when MT4 is reopened, the objects disappear.


I have only ever come across phenomenons 1 & 2 with one single MT4 custom indicator.
What about you? have you experienced these things before with an MT4 indicator/s?
if so, with how many MT4 indicators (i.e. 1 or several)?


If anyone knows a bit more about MT4 programming. What coding issues cause scenarios 1 & 2 ?

Thanks a lot.

1) Yes.

2) Yes and Yes.

The scenarios are caused by the coding techniques.

For example, if the code deletes all the objects in the init rountine then you may see the objects for a split second or 2 as the indicators are being loaded and the POOF they're gone.

If the code doesn't delete all of the objects it creates in the deinit routine, they'll be left behind when the indicator is shut down.

If the code uses BARS to control a loop, this could cause lags due to CPU cycles being chewed up by the code.

MT4 doesn't process like other languages and rookies make those kind of mistakes...LOL! I know because though I have 30+ years programming experience, I am just now getting my MT4 rookie stripes off after a year of Mt4 experience.

Go to MQL4: automated forex trading, strategy tester and custom indicators with MetaTrader if you want to learn more.
 
Hi, does anyone know how i can add an trendline indicator to draw small trendlines for just marking out HH And HL, and LH and LL on my metatrader platform,also how does one add the EA templates that are on this site and get them to work once you save them to metatrader, any help greatfuly appreciated,
Thanks pat
 
RE Metatrader

Hi, does anyone know how i can add an trendline indicator to draw small trendlines for just marking out HH And HL, and LH and LL on my metatrader platform,also how does one add the EA templates that are on this site and get them to work once you save them to metatrader, any help greatfuly appreciated,
Thanks pat
 
Top