fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    Need help for my EA

    Questions & Answers
    2
    4
    576
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      divinefang last edited by

      Hello again, it has been quite a long while since I last posted here and now I need some help with my martingale EA.

      The constants; initial_lot_size=0.01, mutipliersize=2

      I have a Long trade opened and running at 0.01 lot and a Short Pending Order set at 0.03 lot.

      Once the Short Pending Order is triggered, I want the EA to do the following:

      • Breakeven my first Long trade with 1 pip profit.

      • Check the Short Pending Order lot size (say "SPOLS"). Open a Long Pending Order with its price equal to my first Long trade open price, and lot size of "(SPOLS x mutipliersize)+initial_lot_size", i.e. 0.03x2+0.01=0.07

      Now I have 2 trades running (Long 0.01 lot and Short 0.03 lot) and 1 Long Pending Order set.

      If the most recent opened trade TP is hit (ie the Short at 0.03), the EA will delete the Long Pending Order (or any Pending Order).

      Thank you and looking forward to be a subscriber again.

      1 Reply Last reply Reply Quote 0
      • fxDreema
        fxDreema last edited by

        Do i smell what they call "hedging" strategy here?

        There are different ways to control when something is opened and it depends.

        • If you want to work under "on Tick", then on every tick you will check the number of trades or pending orders to decide what to open. The good thing here is that if you restart the EA, it will continue from where it stopped without problems.
        • Working with "on Trade" - you can detect trade events like the moment of opening a new trade for example. So you can open a new pending order when a trade is closed, for example, or everything else. But not that any trade event happen only once. If something wrong happens under "on Trade", there will be no second chance to repeat the same event. This can be good or bad depending on the situation.

        To be hones, I was always lost with these hedging strategies, I can't even imagine them in my mind. You can search the forum for "sure fire" and there is some example that I made loooong time ago.

        1 Reply Last reply Reply Quote 0
        • D
          divinefang last edited by

          Yes hedging and martingale indeed, and I am aware that I am playing with fire 😛

          Back to topic, thank you so much for pointing out the "on Trade" tab, I totally overlooked that one, which is exactly what I needed.

          I need some help about modifying my TP.

          The EA will Buy and set a Pending Order. For the Buy order, I would like the EA to modify its TP to +1 pip if the price is 10 pips below its open price. However upon testing, the EA modify the TP as soon as the Buy order is started. Please have a look https://fxdreema.com/shared/8KjIsLm9

          Thanks

          1 Reply Last reply Reply Quote 0
          • fxDreema
            fxDreema last edited by

            I have this http://prntscr.com/98irhg or this http://prntscr.com/98is6j - not even single TP modification to my Buy trades.

            Try to use the value of -10 in "pips away..."

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post

            Online Users

            H
            B
            A
            T
            R

            13
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors