When creating a trading strategy a developer often faces the necessity to draw graphically in a security window a certain dependence calculated by a user (programmer). For this purpose MQL4 offers the possibility of creating custom indicators. Custom Indicator is an application program coded in MQL4; it is basically intended for graphical...
did you try it on 1 min chart?, because you have set the normal iMA() to 1 min.. and the value of Close[] gives the close prices of the current time frame
did you try it on 1 min chart?, because you have set the normal iMA() to 1 min.. and the value of Close[] gives the close prices of the current time frame
Why oh why does this previous code not just work, its got the buffered array and everything. Looks like I need to assign a value for every bar counted or something like that. .
Following MQL source doesn't set as series at all and works however I need to change the first value to a custom one so I can see in the future:
So Im just running these 2 side by side trying to replicate the exact value of the normal one (second one posted), still no luck. Looks like its the bars counted thing
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
if you want to give custom values for EMA (for any MA for that matter) use iMAOnArray()
https://docs.mql4.com/indicators/imaonarrayWhy does that code not work?
If anyone knows why this code does not work please let me know.. .
Bah just stumbled upon https://book.mql4.com/samples/icustom it looks like buffers are the issue, didn't really get that before posting.
Missed that page. Thanks for helping me out hopefully ill sort this out soon
Why does that code not work?
Set the array as series.
still way off
still way off
did you try it on 1 min chart?, because you have set the normal iMA() to 1 min.. and the value of Close[] gives the close prices of the current time frame
did you try it on 1 min chart?, because you have set the normal iMA() to 1 min.. and the value of Close[] gives the close prices of the current time frame
1m frame , yes ..
what are the values you get?
what are the values you get?
heres a screen
imaonarray is name of indicator on my computer.. .same exact code as above. .
Why oh why does this previous code not just work, its got the buffered array and everything. Looks like I need to assign a value for every bar counted or something like that. .
Following MQL source doesn't set as series at all and works however I need to change the first value to a custom one so I can see in the future:
So Im just running these 2 side by side trying to replicate the exact value of the normal one (second one posted), still no luck. Looks like its the bars counted thingheres a screen
imaonarray is name of indicator on my computer.. .same exact code as above. .
instead of copying the each Close value, try using this
Or just use