Adjustable MA

hemyoki

Trader
Oct 25, 2014
1
0
12
Hi
Does anyone know what is the biggest moving average that this EA can action in mt4. I have tried to use 4000 as p1 and 4 as p2 and it works, (because 4000 is the biggest average mt4 calculates and 9999 is the biggest on mt5.
So my question is that can this EA calculate and action 9999 on mt4?
 

anoo

Newbie
Aug 4, 2015
4
0
2
compounding function...

Hi Enivid, is it possible to get your ea to assess the current available units and make the next trade subject to a percentage total of units available?

To explain, I dont know much about lots, i dont use an ecn, I use oanda and they dont require you to buy a lot. My set leverage is 20 to 1, so when i want to place an order, I can see how many available units are available subject to that leverage level. If i lose in a trade i want the next trade to be adjusted lower to the percentage I set, of available units and vice versa if i won last trade, i want to scale up.

Am hoping you might be familiar with oanda and can help me code something to achieve this compounding and compound reducing effect.

Thanks for all the excellent work you have done with this
 

anoo

Newbie
Aug 4, 2015
4
0
2
sorry, seems like as soon as i verbalize the question, i get my answer, thanks :)
 
Last edited:

WINI

Newbie
Jan 13, 2019
4
0
1
29
hi
Magic Number

Hi , I am using the EA on multiple currency pairs on the 5 minute chart; does the code generate a unique magic number for each pair? no trades so far so I am not sure - the backtests were very nice, now testing on my demo - thanks a lot for a great EA!!
,



hi can i use the adjustable _ma just for take profit and stoploss , i do not want it to open trades
 

WINI

Newbie
Jan 13, 2019
4
0
1
29
In the
If you mean that you want to use it to exit the trades by MA cross without entering them, you would need to modify its code quite significantly for that.

In the Ea there is no way to use it as only exit on defined pips ?
 

yuluda

Trader
Feb 28, 2016
1
0
22
53
hi friends I sent a ma setting photo and where can I put (-15) in code ???
answer please


soruuuuu.jpg
soruuuuu.jpg

I want to writing -15 in fast ema but where is it?
 
Last edited by a moderator:

DrSlater06

Trader
Jul 5, 2023
4
0
6
32
Hi Enivid,
Is it possible to add something to the EA? A toggle between 'long only' when ema 1 crosses up on ema 2 or 'short only' when it crosses down. Maybe a third option for 'both' if people want to play both.

Kind regards,
Dr Slater
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,532
1,355
144
Odesa
www.earnforex.com
Is it possible to add something to the EA? A toggle between 'long only' when ema 1 crosses up on ema 2 or 'short only' when it crosses down. Maybe a third option for 'both' if people want to play both.
There is a little known feature in MetaTrader that allows you to restrict EAs trades to one side when you attach it to a chart:
1688553940823.png
 

DrSlater06

Trader
Jul 5, 2023
4
0
6
32
Hi Enivid, I've tried to re-add the indicator and don't seem to have that option, but thank you for your speedy reply.

Do you or the EarnForex team assist users in coding complex logic EAs at all? I was looking for help on a project for my company.

Kind regards,

Dr Slater
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,532
1,355
144
Odesa
www.earnforex.com
Hi Enivid, I've tried to re-add the indicator and don't seem to have that option, but thank you for your speedy reply.
Not sure if that was a typo, but you can change that only when adding an EA, not an indicator. It's in the Common tab of the screen that popups when you attach any EA to a chart.
Do you or the EarnForex team assist users in coding complex logic EAs at all? I was looking for help on a project for my company.
No, but I could probably answer some specific questions about coding if you have them.
 

DrSlater06

Trader
Jul 5, 2023
4
0
6
32
Thanks Enivid, I really appreciate your time.

Complex logic for the EA to solve: retrieving data from a higher timeframe (4hr) within your EA, while running the EA on a lower timeframe chart (15min).

Here's an example of what we'd like an EA to do:
  1. 4hr 8/21ema cross = trend (only long 8ema above, only short when 8ema is below).
  2. While the above long/short channel is open on the 4hr, we wait for a valid pull back on the 15min. Assume we are long on the 4hr (8ema above 21ema): when the 15min 21ema crosses under the 15min 50ema this is a valid pull back.
  3. Then when the 15min 8ema crosses up on the 15min 21ema we enter long.
So we kinda want an EA that does that top-down scan every tick on bar close in that order (4hr trend -> 15min valid pullback -> 15min entry). Is it possible for a MT5 EA to do this and how easy would it be to code?

Kind regards,

Dr Slater.
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,532
1,355
144
Odesa
www.earnforex.com
So we kinda want an EA that does that top-down scan every tick on bar close in that order (4hr trend -> 15min valid pullback -> 15min entry). Is it possible for a MT5 EA to do this and how easy would it be to code?
Yes, that is possible. That shouldn't be much more difficult than coding a similar non-MTF EA. Retrieving the MA data for upper timeframes is similar to retrieving it for the current timeframe.