EA fix: Close all positions at profit target X -
1 2

thread: EA fix: Close all positions at profit target X

  1. #11
    Junior Member aritzpktitze's Avatar
    3
    pls. Try attached, I extended the onscreen-comment also two new external vars added, should be self-explanatory... file
    Hello everyone, this kind of EA is very good, but I've a petition ( if possible) to avoid that the EA near at profit 1 single open order ( I apply trailing profit / TP so isn't required an EA) is it possible to put in a sort of filter like this:


    a) apply #8220;Close everything#8221; ONLY evaluating open orders (OP_BUY OP_SELL)
    b) MINIMUM number of available orders to employ #8220;Close everything#8221;-LRB- if Complete Open Orders is lt; at this #8220;value#8221; no activity will be performed)
    ex. : 1 lot OP_BUY 0.8 lot OP_SELL 2.5 lot OP_BUY = 3 orders

    Many thanks for your patience of reading:--RRB-, Lorenzo from Italy

    P.S. maybe is the purpose altready current called extern dual ProftableTradeAmount = 1; // Just trades over this amount close out Thanks
    https://www.cliqforex.com/attachment...491624369513.1

  2. #12
    Senior Member ouuhyeaah's Avatar
    155
    quote Hello everybody, this kind of EA is excellent, but I have a petition ( if possible) to prevent that the EA near in profit 1 open order ( I employ monitoring profit / TP so isn't necessary an EA) can it be possible to add a kind of filter like this: a) employ”Close everything” ONLY assessing open orders (OP_BUY OP_SELL) b) MINIMUM amount of available orders to apply”Close everything”( if Total Open Orders is lt; in this”worth” no actions will be performed) ex. : 1 lot OP_BUY 0.8 lot OP_SELL 2.5 lot OP_BUY = 3 orders Thanks for your patience...
    I understand this was awakened from a ancient thread, but I only wanted to add some comments as it is popping up again... Not only does the CloseAll function unnecessarily burn profits by incorrectly handling orders (literally pays unneccesary fees to the broker), but it also initiates a loop that may potentially lock the platform. If you've got real money at stake Don't use this EA.

  3. #13
    Junior Member aritzpktitze's Avatar
    3
    Hello Nicholishen, thank for your information, I would have chosen possess a EA coded with this alternatives and could judge practically, because till now that EA has worked on my cash. I could ask in the section EA. Many thanks.

  4. #14
    Senior Member ouuhyeaah's Avatar
    155
    Hello, thank for your advice, I would have preferred have a EA coded with this alternatives and may judge practically, since until today this EA has worked properly on my real cash. Maybe I could ask in the section Coding EA. Many thanks.
    Just know that you are leaving money on the table when you use this. As for me, I wouldn't burn profits just to close a position when there's a way to close positions to prevent paying extra (unnecessary) fees. If you are comfortable giving your broker your profits by paying then by all means keep using this.

  5. #15
    Junior Member aritzpktitze's Avatar
    3
    quote Just know that you are leaving money on the table when you use this. Personally, I wouldn't burn profits simply to shut a position when there's a way to close positions to prevent paying extra (unnecessary) fees. If you are comfortable giving your broker your profits by paying then by all means keep using this.
    I guess we are talking about various brokers and different kind of trade: I have chosen a broker using a bit higher disperse but no commissions on order closing, so for me closure hedging orders that are in profit is commissions , and I'd select to do that when are over 1 order ( such as 3 orders running together) and the total profit is... 50 euro... so shut everything... and I'm ok to restart using a new commerce. But my question is.... Are you currently able to code that? Or anyone else is in a position to?

  •