1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Welcome back! Thank you for being a part of this Traders Community. Let's discuss and share :)
    Selamat datang kembali! Trimakasih telah menjadi bagian dari Komunitas Trader ini. Mari berdiskusi dan berbagi :)
    Dismiss Notice

Suggestion Help for partial closures

Discussion in 'Belajar MQL dari Nol' started by valerio, 16 Sep 2017.

  1. valerio

    valerio Member Credit Hunter

    Equity
    Credit
    Ref Point
    Hi all.
    I did a simple H4 and daily EA based on moving averages. It works on many well tranding pairs (GBP,JPY, CHF; mainly) It's quite promising and sometime I see until 3000/4000$ of gain in my 10K cent account.

    What I need to improve is partial closures.

    For example I want that
    -when 100 pips are done (target1) EA closes 20% of the positions
    -when 200 pips are done (target2) EA closes 20% of the positions
    -when 300 pips are done (target3) EA closes 20% of the positions (and puts stop loss at break even possibly)
    -when 400 pips are done (target4) EA closes 20% of the positions

    I saw that some EA specialized in partial closure are available (not many to say the truth and some are also for sale). Some other are working very bad.

    So is there Anybody which could write down two lines of code (mq4) to help me to do that by mysel ?

    I'de be very grateful. Any other suggestion is good!
     

    Attached Files:

    • valg.png
      valg.png
      File size:
      255.6 KB
      Views:
      25
  2. AutoProfit

    AutoProfit Active Member Credit Hunter

    Equity
    Credit
    Ref Point
    I'd like to help you improving your EA.
    Send your mql4 file directly to my email will much help me response quickly.
    find me at http://autobot.businesss.site
     
  3. NeoBatavia

    NeoBatavia Well-Known Member Credit Hunter

    Equity
    Credit
    Ref Point
    Tell us about the strategy, then I might able to help you.
     
  4. valerio

    valerio Member Credit Hunter

    Equity
    Credit
    Ref Point
    Hi. Well is very simple
    buy at the beginning of the new bar if moving esponential average 15 (EMA15) goes over EMA 50
    close the position when EMA 15 goes under EMA 21

    sell when opposite condition happens
    (EMA15 <EMA50 sell
    EMA 15<EMA 21close )

    Target 500 points (I want to introduce the partial closures and break even when 200 points are done)
    stop loss 150 points

    TF H4 and D1

    lots must be variables.

    Thankss!
     
    • Like Like x 1

Share This Page