Re: Coding Help

1122
Dear friends,

I've been a lurker on this forum for some months. This being my first post, I should preface my question by saying that I'm very much grateful for all the work that went into programming the indicators and ideas, and organizing this forum. It feels like such a productive, open, and friendly place. Huge "thank you" for all those who made this place into what it is!

I have recently started learning MQL4, which has been really fun for me. Recently I've hit a wall though, with me spending a number of days trying stuff and not being able to get it to work. So I figured I should ask the pros here ;-) Here are my two questions:

- Is there any way to have an extern variable which would take a CSV list of parameters, which string (with appropriate transformations) would be then be used in an iCustom call in the body of the invoked indicator? Essentially, I'm trying to create an indicator wrapper, which would take as parameters an indicator name, and indicator CSV list of parameters. It's preferred that this solution is run-time (rather than compile-time). My issue is that iCustom expects the parameters to be of correct datatypes, and given that this language is strongly typed, doesn't appear to have variable variable names, it doesn't seem to support runtime creation of structures with different datatypes, and it doesn't seem to support dynamic deletion and reallocation of variable names (these are some of the things that I've researched and / or tried), I don't see any way to program this other than creating a giant switch inside the code which would account for every possible permutation of every possible datatype, up to some max number of parameters. That would be some pretty massive, hacky, ugly code.

- Is there a way to copy an an entire buffer of a given length for the invoked indicator, as opposed to going through one buffer value at a time the way iCustom does? I understand that MQL5 has a way to copy an entire buffer like that (CopyBuffer function), but can I do something similar in MT4 (probably not natively, but perhaps there's a way of creating one's own function?) My issue is that I am creating wrappers around my indicators which contain additional decision-making logic. I plan to invoke those indicators from a dashboard-type top-level indicator. If I have to loop through let's say 1800 bars of a given indicator each time for the wrapper to work, and then the higher level dashboard indicator will issue 1800 iCustom calls to the wrapper (it won't just need the latest signal, but the visible chart's number of bars, as I'd need that for automated analysis purposes). Multiply that by several indicators and then by 28 pairs, and one can imagine what that would do to system resources.

I would greatly appreciate every bit of help. I am sure I don't yet know some cool and clever features of MQL4 that would allow one to do those types of things, so I would appreciate every bit of advice, code samples, indis with similar logic in them, and anything that would help crack those two dilemmas.

Thank you in advance!

Re: Coding Help

1125
ashish4forex wrote: Wed Jul 08, 2020 12:01 am hello coder can u pls remove the alert i am attaching the mt4 he can alert constantly and also hang the mt4 pls help us fix this issue thank you
That indicator is a repainting version of Ehler's fisher transform, might try here in the forum, there are a lot of non repainting versions here.


Re: Coding Help

1128
I know pretty much nothing about coding, but I am curious if it would be possible to stop an indicator from repainting. I trade off of higher time frames so the repainting isn't very drastic and still works with my current strategy but I feel that I would benefit from deactivating the repainting feature. If anyone has any input it would be greatly appreciated.

Re: Coding Help

1130
Hi
Need assistance in adding a button on the following indicator
I have manged to create the button, the control of the line (Show data) is creating all sorts of problems.
The code added by me is delineated by //************

Would you be able to assist?
Thanks in advance.
These users thanked the author JNS247 for the post:
Banzai


Who is online

Users browsing this forum: No registered users and 20 guests