pete42:
Hi,
I am trying to put together a simple EA to give me the price in relation to the EMAs on multiple timeframes.
I dont seem to get the color right. it is always coming out as clrBlack
Can someone help me on this please.
Cheers!
- pete
Color names start with clr
https://www.mql5.com/en/docs/constants/objectconstants/webcolors
Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Web Colors
- www.mql5.com
Constants, Enumerations and Structures / Objects Constants / Web Colors - Reference on algorithmic/automated trading language for MetaTrader 5
pete42:
Hi,
I am trying to put together a simple EA to give me the price in relation to the EMAs on multiple timeframes.
I dont seem to get the color right. it is always coming out as clrBlack
Can someone help me on this please.
Cheers!
- pete
Dear,
Your code is correct.
You have a little mistake. Change to 8 EMA Period:
ema5m1 = iMA(NULL, PERIOD_M1, 5, 0, MODE_EMA, 0, 0); ema5m5 = iMA(NULL, PERIOD_M5, 5, 0, MODE_EMA, 0, 0); ema5m15 = iMA(NULL, PERIOD_M15, 5, 0, MODE_EMA, 0, 0); ema5m30 = iMA(NULL, PERIOD_M30, 5, 0, MODE_EMA, 0, 0); ema8m1 = iMA(NULL, PERIOD_M1, 8, 0, MODE_EMA, 0, 0); ema8m5 = iMA(NULL, PERIOD_M5, 8, 0, MODE_EMA, 0, 0); ema8m15 = iMA(NULL, PERIOD_M15, 8, 0, MODE_EMA, 0, 0); ema8m30 = iMA(NULL, PERIOD_M30, 8, 0, MODE_EMA, 0, 0);
Arash
Copy Paste... Silly me!
Thanks a lot!
On MT4: Unless the current chart is that specific pair/TF referenced, you must handle 4066/4073 errors
before accessing prices.
Download history in MQL4 EA - MQL4 and MetaTrader 4 - MQL4 programming forum
Download history in MQL4 EA - MQL4 and MetaTrader 4 - MQL4 programming forum
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
I am trying to put together a simple EA to give me the price in relation to the EMAs on multiple timeframes.
I dont seem to get the color right. it is always coming out as clrBlack
Can someone help me on this please.
Cheers!
- pete