Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Forex2K10 EA - Stop Orders Trading (Forex2K10 EA - Stop Orders Trading)

author EAcpu | 4 reads | 0 comments |
Hey guys,

I've been a reader of Forex Factory for a long time, but haven't contributed much in the past. I wanted to share an EA that I recently revisited that I put together for a friend not too long ago. I hope the forum members here will look at it with a discerning eye and either suggest changes or make the changes themselves and share any possible results from the EA.

Having said that, now let's talk about EA and strategy. The strategy may not be that revolutionary (probably so for an EA) but it is based on new highs/lows depending on the time frame etc. When new highs/lows are detected, a stop loss order will be placed 15 pips away, hoping to take advantage of the price change. Initially, my friends and I intended to use it on H1 and above timeframes, but the more I modified the EA, the more I discovered that it could be useful on lower timeframes as well. We found it works fine on most pairs, apparently it propagates sensitive and
______________________________________________________________

EA has two cycles, one is the global cycle, which stops when the SL or TP of the account currency is reached; the other is the local cycle, which stops when the order is executed when we set a stop loss order and drag it with the price.

nbSteps allows you to fine-tune SL/TP size to achieve your value when you have nbSteps direct loss/profit - essentially stopping the EA

resetTriggerInPips - the size of moves that the EA waits for after the completion of the global period

forgetTriggerInPips - the size of moves that the EA waits for after completion of the local period.

*Stop Loss and Take Profit are now in USD - also hidden.
______________________________________________________________

Some things I'd like to do (but not sure if it would increase the profitability of the strategy):

- To take advantage of new highs/lows, I find it necessary to use quasi-martingale lot sizes - I've never been a fan of using martingale pricing, but haven't found a way to make this work (nicely) otherwise

- Add functionality, I haven't tried it but have considered adding an hourly function and variables to allow the EA to trade only between specific hours.

Any Ideas, suggestions, revisions, criticisms are very welcome.

I apologize in advance for the lack of helpful code comments and generally sloppy coding...

Attachment to original post (1)

Verification code Refresh