Page 1 of 3 123 LastLast
Results 1 to 10 of 29
 6 Attachment(s)    

Thread: Trendmeleaveme - trendline break semi-automated EA

  1. #1

    Default Trendmeleaveme - trendline break semi-automated EA

    Hi Funyoo,

    Attached is the trendmeleaveme3.mq4 EA developed by Waddah Attar a few years back, and modified by folks at Forex-Tsd TrendMeLeaveMe - Forex-TSD

    It makes a trade when a manually applied trendline (using '/' on the Mt4 menu bar) is broken. I find it very useful for setting up for potential trades overnight or when I can't be at my desk. Trendline breaks are a simple and effective way to take pips from the market, and with trendmeleaveme you can apply tight stops and profit targets.

    Problem with this EA is that it will not make just one trade, but will open trades whenever the trendline is hit, so if after the initial trend break produces a trade, another trade will open if the market price comes back to the trend line! For some overnight sessions I've had up to 10 trades take place as the market meandered back and forth along the trend line.

    So, my request is, can you change the EA so that it only makes a single trade for each trendline. I'm thinking that maybe the trendline name (in properties) can be changed to something other than the trigger name ('buystop' and 'sellstop') once a trade is in place and the sl and tp are submitted. Either that or just have the EA delete the trend line so it isn't visible to the EA anymore.

    Hope you can help, thanks as always.
    Attached Files Attached Files

  2. #2
    Junior Member
    Join Date
    Mar 2009
    Posts
    17

    Default

    Hi Joekool,

    I had some spare time so I'd thought I would try to do this, I'm no coding guru like Funyoo but this seems to work as you require it to. It uses Funyoo's template and some open source code I found elsewhere. As it uses FY's template you can apply trailing stops, martingale, High Low stops etc etc etc to any trades opened. you will need to put the attached common_functions.mqh into you include folder and the Manual Trendline Break EA.mq4 into the experts folder.

    To use... load the expert onto the required chart, then create a trend line using "/", double click the new trendline and put in the description field either "start long" to enter a buy when it crosses the line or "start short" to enter short when it crosses the line.

    As always, try it in demo several times before using live. I have not extensively tested it.

    If FY comes back with something better then use his!

    Good luck!
    Attached Files Attached Files

  3. #3

    Default

    Thanks fxdreamer, much appreciated, I'll give this a try tonight and report back.

  4. #4

    Default

    fxdreamer, I wasn't able to get EA working overnight. I put the mqh file in the experts/include folder, and the mq4 file in the experts folder, added the EA to a few charts, drew trendlines, labelled them 'start short' or 'start long', changed the magic numbers to unique numbers, got the EA smiley face, enabled live trading, etc and although the trendlines were broken, no trades were initiated. The Journal indicated the EA loaded successfully in all cases. Meanwhile, on other charts, I had the original EA set up and there were several trades with it. Any suggestions?

  5. #5

    Default

    Funyoo,

    fxdreamer's EA does not appear to work.

    Could you please try to implement my suggestion in the first post?

    Thanks!

  6. #6
    Junior Member
    Join Date
    Mar 2009
    Posts
    17

    Default

    Hi Joekool,

    I just tried again and it worked fine. When you say 'changed the label' what are you changing, perhaps the name, it needs to be in the description ?

    Add your trend line then right click on the line and then click on the line properties, in the description field (NOT the name field) enter "start long" or "start short".

    If it has worked correctly the line will change colour shortly afterwards to a purple dashed line, this shows the EA has identified the new line.

    Good luck (again!)

  7. #7

    Default

    Thanks fxdreamer, it does help to read the details, I simply assumed that the name field needed changing, not the description field (as per the original EA). So yes, it is working and I'm in a trade at the moment. I will follow up again in a day or so. Thanks again!

  8. #8

    Default

    You did a great job on this EA fxdreamer, it appears to be working perfectly, and I"ve been making some decent pips with it. Combining the trendmeleaveme EA with Funyoo's template makes this a very useful forex tool. Thanks again!

  9. #9

    Default

    Hi fxdreamer,
    trendline works fine could u pls modify it and let trade start on the close of cadnle that will broke trendiline, usuallu i use it on h4 but the candle close. thx a lot

  10. #10
    Junior Member
    Join Date
    Mar 2009
    Posts
    17

    Default

    Hi,

    Try this, in entry logistics parameters there is a new parameter called usewfcc (Use Wait For Candle Close) set this to true and once the trend line is passed a trade will be opened at the next candle open (is that what you wanted ?). **Beware** on a 4hr chart this means price could have moved a long way from where the initial signal occurred, the trade will be entered at the price of the opening candle not the price where your trend line was drawn. So, if you draw a line and set it to go short when price crosses the line a short trade will be taken at the open of the next candle in the meantime price may be going in the wrong direction!! Test thoroughly in demo before using live.

    (as before...common_functions.mqh required in experts/include folder otherwise compile will fail)

    FXD.

    (P.S. also added a message box confirmation but did this not always work in back test (no idea why) may be ok on forward demo, leave set at false in you don't need it)
    Attached Files Attached Files

Similar Threads

  1. Pending Order - Semi Auto
    By zalinarashid in forum Ideas for expert advisors
    Replies: 2
    Last Post: 09-28-2010, 22:51
  2. Semi Automatic PA EA
    By blackdog in forum Ideas for expert advisors
    Replies: 7
    Last Post: 05-24-2010, 14:13

Tags for this Thread

100, 4x4me, automatic, broker, brokers, candle, change, coding, color, copy, decompiler, demo, eas, ex4, expert, experts, forex, funyoo, high, indicator, live, low, magic, managed, manual, martingale, metatrader, mq4, mt4, pips, profit, real, request, sales, sells, server, signal, simple, stoploss, strategy, support, system, test, time, tool, trading, trading system, trailing, trend

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •