Ask! - page 65

 

Little help if you may

Hello Members/Coders

This is not a huge job and I have given it a go but am currently experiencing a little trouble with this code.

I was looking for somebody to write me a very simple EA based on the Megatrend Indicator (not MTF just the single line adjustable input).

All it needs is the standard inputs, Lot amount, adjustable magic number, an alert and the Megatrend values. Basic EA logic command is when a buy signal given (Megatrend line swinging up and changing color), open buy (obviously) and when opposing sell signal comes the buy is closed and sell opened.

This command keeps rolling back and forth until EA removed from chart.

Don't worry, I realize it's no better than crossed MA's by itself but it's a small component of a larger system.

As I said, I had a crack at writing it but alas, I am more the trader than a programmer.

If somebody could help out or give me a shove in the correct direction that would be really kind.

Many thanks

Archimedes

Files:
megatrend.mq4  5 kb
 

I am trying to code a very basic money management technique into an EA i am coding. Basically, I want to have the EA automatically scale my lot size by some adjustable factor based on my account balance. For example, if I enter a value of 1, the EA would perform calculation and determine a lot size of 5 lots with an account balance of 5,000.00 (in other words, 1 lot for every 1000.00 balance).

Well anyway, my problem has been how to round the the calculted value to the nearest decimal place. I've copied the EA code below to show you how I have tried to accomplish this. Well, I have yet to get it to work. So I beg your assistance and hope you can point out what I may be doing wrong, or what i need to do to get this to work. I hope i've explained it clearly enough for you to understand what i want to accomplish.

Thanks in advance for any help

 

Trailing Stop Help

Is it possible to program the trailing stop into an EA so that it does not take affect until a trade has gone so many pips into profit? If so, what might the code look like.

 
waaustin:
Is it possible to program the trailing stop into an EA so that it does not take affect until a trade has gone so many pips into profit? If so, what might the code look like.

Here is an example:

mauro_trailing.mq4

Files:
 
Archimedes:
Hello Members/Coders

This is not a huge job and I have given it a go but am currently experiencing a little trouble with this code.

I was looking for somebody to write me a very simple EA based on the Megatrend Indicator (not MTF just the single line adjustable input).

All it needs is the standard inputs, Lot amount, adjustable magic number, an alert and the Megatrend values. Basic EA logic command is when a buy signal given (Megatrend line swinging up and changing color), open buy (obviously) and when opposing sell signal comes the buy is closed and sell opened.

This command keeps rolling back and forth until EA removed from chart.

Don't worry, I realize it's no better than crossed MA's by itself but it's a small component of a larger system.

As I said, I had a crack at writing it but alas, I am more the trader than a programmer.

If somebody could help out or give me a shove in the correct direction that would be really kind.

Many thanks

Archimedes

You might want to try creating another thread for your proposed system. This topic is generally just for programming problems and not for the development of a full-blown EA.

If you do you know a little bit of coding yourself, you can check this thread: https://www.mql5.com/en/forum/general and use one of the fine EA templates to create the EA yourself. I also do programming for a fee, so if you want to go that route, you can send me a PM for more details, or choose one of the other fee-based programmers.

 

Thanks

ryanklefas:
You might want to try creating another thread for your proposed system. This topic is generally just for programming problems and not for the development of a full-blown EA. If you do you know a little bit of coding yourself, you can check this thread: https://www.mql5.com/en/forum/general and use one of the fine EA templates to create the EA yourself. I also do programming for a fee, so if you want to go that route, you can send me a PM for more details, or choose one of the other fee-based programmers.

Thanks for the tips.

Archer

 

ema

Hi, just wondering if anyone know how to fix my ema. See post: https://www.mql5.com/en/forum/177324

Thanks,

Dustin

 

EA to open orders

Is there a an EA that will OPEN a once-only manual order at a specific price (not a distance trigger) at a certain time?

I want to set the open order parameters, T/P, S/L, etc., initiate the order at one particular time and set an expiration time for the order.

I haven't found anything that will accomplish this. I tried TMLM but it opens multiple orders.

Any help welcomed.

 
WNW:
I tried TMLM but it opens multiple orders.

What is TMLM? I don't know of any EAs that do what you are asking for.

 

TMLM is TrendMeLeaveMe.

Reason: