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
Well, EMA is just a formula that takes three inputs and spits out an output.
This macro can simplify your code, but in essence, it's the same formula you have above.
I use this formula all the time.
There is a library of MQL5 routines, one of which should also fit your needs.
https://www.mql5.com/en/code/77
But yes, if you want to create an indicator that does EMA on your terms, I would probably start with the free indicator from MetaQuotes and tweak it until it fits your needs.
So ima on array or ima both the same?
C is where I input the Custom Value so I can place Bid + 1 or Bid +2 or Bid +3 or bid +4 etc?
I generate 2 Arrays? Why go through all this, Im already at
Is perfect, Cant accept the Bid custom values to compute the thing.. How have it be able to be accurate with custom value instead of Bid? Build an array with the current Bid first?
Call iMAOnArray instead of Bid? What if I got a custom value like Bid + 1?See the file \MQL4\Include\MovingAverages.mqh
See the file \MQL4\Include\MovingAverages.mqh
What do I place custom price data? For Price to EMA conversion?
Dont really know what to put in any of those.
MaBuffer0[i]=EMA(MaBuffer0[i-1], dCurrValue, g_maPeriod);
EMA(MaBuffer0[i-1] ////////// This is just the array with all of the previous closes for the past 12 periods? dCurrValue is where I put custom data of whatever experiment I want to do with Bid + X ? gMAPerdiod Ive no clue what about yet.
Well, EMA is just a formula that takes three inputs and spits out an output.
This macro can simplify your code, but in essence, it's the same formula you have above.
I use this formula all the time.
There is a library of MQL5 routines, one of which should also fit your needs.
https://www.mql5.com/en/code/77
But yes, if you want to create an indicator that does EMA on your terms, I would probably start with the free indicator from MetaQuotes and tweak it until it fits your needs.
Dont really know what to put in any of those.
MaBuffer0[i]=EMA(MaBuffer0[i-1], dCurrValue, g_maPeriod);
EMA(MaBuffer0[i-1] ////////// This is just the array with all of the previous closes for the past 12 periods? dCurrValue is where I put custom data of whatever experiment I want to do with Bid + X ? gMAPerdiod Ive no clue what about yet.
What do I place custom price data? For Price to EMA conversion?
Dont really know what to put in any of those.
Well anyway I'm now more than happy to read about your method.This shouldn't be THAT impossible.
Anyway just to make clear I hope you and anyone reading understand that I want to put completely custom number in the first close so that I can anticipate in the future what the EMA's are going to be when price is current bud + 1*Digit or any other custom bid price for the first close.
Again thanks. I think I'm on the right path, its just a matter of generating an array that has the first value of the iClose "customized".
Looks like I just need to put my 'customized first close array' insted of using the standard "Close" array at
price12=Close[shift12];