fxDreema

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

    Is it possible to make an EA to instantly create multiple stops?

    General Discussions
    2
    4
    1939
    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.
    • J
      josephbasilio last edited by

      Im completely new to EA's and im wondering if anyone can answer this question for me, and if the answer is yes, can you point me in the right direction of how to make code this myself or have someone help me..

      So my Goal is fairly simple, i would like to enter a single trade (either entry order or market order) lets say for 10 lots, and my desired stop loss is 100 pips, but instead of having a single stop loss 100 pips away that will close my whole position i would like to systematically scale out of my position, such as that considering 100 pip stop, every 10 pips away from my entry there would be an order to close 1 lot, which would significantly limit my risk, but would maximize my upside if the trade were to immediatly go in my favor.

      my goal would be to create an EA that all i would have to do is enter my desired entry order, my trade size, and my total stop loss, and have the EA create evenly spaced entries behind my initial trade to scale me out of the market, this had to be possible, but can an EA do this, or by some other means? any help would be much appreciated!!!

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

        Interesting question. I was trying to make something, but if I start with a trade and then that trade is partially closed multiple times, the problem is that each following child-trade has different ticket number, but it's OrderOpenPrice() stays the same as the one from the original mother-trade. So now I'm not sure how to get the latest... let's call it Open Price of the Child.

        I was also thinking for something with pending orders in gridusing Grada, but the problem that I found is that when I want to open each one with different lot size (using Gradation settings), at some level calculations are going wrong because of the lot step. Which is something that I'm gonna try to fix.

        1 Reply Last reply Reply Quote 0
        • J
          josephbasilio last edited by

          thanks for the response and Interesting response, keep me posted if you are able to work around the issues you are having, i am completely foreign to the problems your listing as i have never coded anything and just recently (two days ago) discovered fxdreeema.

          As an alternative way to accomplish what i want without completely automating the process would be, to manually enter a single limit or market order as you normally would on any platform, but then have a tool or indicator almost like a Fibonacci tool that you can draw a grid of lines of where you would want your exits, and each line would indicate where to place a separate/independent entry order, im posting a template of the calculator that i created in excel which helps me to manually create these orders, i currently trade this system and trade it profitably, the only issue is i am scared to manually trade this on a shorter time frame because i am afraid the market will move against me before i have time to manually create the orders, the ability to scale a large position out in tiny pieces is a very very powerful risk management tool.

          there are various ways that this strategy can be more streamlined, but since most of them still requirea slight bit of programming, that alone is what is holding me up. any ideas of what i can do? or any bits of software that you may be able to create would be much appreciated, that being said if you/anyone is willing to take this on as a project i would absolutely be willing to pay for your services, iv researched almost every platform and non of them have standard features that accommodate what im looking for, ninja trader kind of does with the ATM strategy but it only allows up to 3 stops, when im looking for atleast 5 and as mucseperate the example i show below uses 10 separate orders to scale me out of my trades.

          **excel example: **enter long 10 lots, full stop loss is 100, ever 10 pips from the entry 1 lot is sold off limiting the overall risk but dramatically increasing return if the market goes in my favor (depending on how many stops, if any are taken out before continuing in my favor)total risk is $55.80.order entry.PNG

          ......
          order entry.PNG

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

            Here is some idea: https://fxdreema.com/shared/HBgwoQHnc

            This is I think exactly what you want, but I'm pretty sure you will not understand what is going on here: https://fxdreema.com/shared/NNuCCXO9d
            I use one extra Variable to change the amount of pips that must be traveled, only because I can't find how to get the OpenPrice of the latest child-trade. And by "child-trade" I mean... you will see how you start with one trade and how each following trade is visually connected to the initial one. This is done by MetaTrader itself

            I was also thinking about this, but something doesn't work with lot sizes: https://fxdreema.com/shared/dCa88msrb
            90% of the first lot size is 0.9 if the lot size is 1. But the next order calculates 90% of 0.9, which is 0.81 (not 0.8). And when you reach lower levels the numbers deviate more and more. This is because each following lot size is % of the previous one, not of the first one

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

            Online Users

            P
            M
            C
            J
            V
            G
            E
            H
            C
            D

            23
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors