Maximum overkill Close-All script - Page 4
Page 4 of 846 FirstFirst ... 23456 LastLast
Results 31 to 40 of 52

Thread: Maximum overkill Close-All script

  1. #31
    Quote Originally Posted by ;
    quote No it prices exactly the same. It's just a more efficient approach.
    Nicholishen, Thank you to your reply.
    Please see attached screenshot of Account History at which you are able to observe the open trades of EURUSD and USDJPY were shut without any cost.
    The lot size of closure trades were displayed'0.00'
    Please remark.
    Thanks,

  2. #32
    Quote Originally Posted by ;
    quote, thanks to your answer. Please see attached screenshot of Account History at which you are able to see the open transactions of EURUSD and USDJPY were closed with no cost. The lot size of closing transactions were displayed'0.00' Please note. Thanks, picture
    Yes, I understand.

    You only pay spread/commission on a single trade instead of two when you use closeby with offsetting orders, however it is the identical cost as if you'd closed one trade normally. There is not any cost benefit in using a hedge to close a trade - only convenience.

  3. #33
    Quote Originally Posted by ;
    quote Yes, I Understand. You only pay spread/commission on one trade instead of two when you use closeby with offsetting orders, but it is exactly the identical cost as if you had closed one trade normally. There's not any cost advantage in using a hedge to shut a trade - just advantage.
    Nicholishen, thanks for the clarifiion.
    Regards,

  4. #34
    Quote Originally Posted by ;
    quote Yes, I Understand. You only pay spread/commission on one trade rather than two when you utilize closeby with offsetting orders, however it's the identical price as though you'd closed one transaction generally. There's no cost advantage in using a hedge to shut a trade - only convenience.
    Thanks for clarifying this. I went to a major spin last night working on this technique. Unfortunately, replacing a close-all with close-by will require more work to keep track of hedged and unhedged places if one decides to keep the hedged trades running. I see no benefit to keep the hedges running with frozen pnl. To keep things simple, as it pertains to do a close-all, it's far better to open a opposing hedge and activate a closeby shortly after (manually works fine but through script it won't)

    So to summarize my understanding this way...
    1)there is no cost savings using closeby
    two ) there is no economies in slippage prevention either as slippage could occur with the hedged order also.
    3) The benefit is there in reference to performance and convenience

  5. #35
    Quote Originally Posted by ;
    quote Thanks for clarifying this. I moved to a major spin last night working on this technique. Regrettably, substituting a close-all with close-by would need more work to maintain track of hedged and unhedged places if a person decides to maintain the hedged trades running. I see no advantage to maintain the hedges running with pnl that is frozen. To keep things simple, as it pertains to do a close-all, it is better to open a opposing hedge and trigger a closeby right after (manually works fine but via script it won't) So to summarize my understanding this way....
    The sole reason to ever freeze a position would be to match the system and conserve the leverage of the original order. If you NEED this then you are obviously in trouble about the position and at that point you are not trading, you are gambling.

  6. #36
    Quote Originally Posted by ;
    quote The sole reason to freeze a position would be to game the system and conserve the leverage of the original order. If you NEED this then you're obviously in trouble on the situation and at that point you're not trading, you're gambling.
    I would 100 percent ageee if one is freezing losses but I am freezing just my floating profits for even more exponential growth/explosion. I am leveraging up my floating profits into building even more positions once the conditions are ripe for additional moves. If not, all I lose is that my frozen price fits and get out in BE. It might be described as shut and add rather than closure and reverse.:--RRB-

    And that I do this compartmentalizing on many filters on the same pair for all buys and all sells at a sub-recursive fashion so, in my larger floating profit (per week ) goal is reached, I do a master closeall and call it weekly. . .at least that is the idea for this undertaking

  7. #37
    Quote Originally Posted by ;
    quote I would 100% ageee if a person is freezing losses however I'm freezing just my floating profits for even more exponential growth/explosion. I'm leveraging up my floating profits into creating even more places once the conditions are ripe for additional moves. If not, all I lose is my frozen price matches and get out at BE. It could be described as close and add rather than close and reverse.:--RRB- And that I do this compartmentalizing on several filters on precisely the same pair for all buys and each of sells at a sub-recursive fashion so, if my bigger floating profit (per week )...
    That makes no sense. Free margin relies on account equity. There is no reason to freeze profits unless you're only a glutton for fees.

  8. #38
    Quote Originally Posted by ;
    quote That makes no sense. Free margin relies on account fairness. There is zero reason to suspend profits unless you are only a glutton for fees.
    You should look into how freezing profits is used as a method to simply follow the Long-term trend (millipede style)

  9. #39
    Quote Originally Posted by ;
    quote you ought to look into just how freezing profits is used as a method to simply comply with the long-term trend (millipede style)
    Again I shall strongly assert that hedging to freeze profits and taking profit are literally exactly the same net impact, except using the freeze you take on extra risk of accruing double swaps. Unless for some really special reason you're attempting to play games with your account balance curve, There's no benefit to freezing profit

  10. #40
    Quote Originally Posted by ;
    quote Again I shall strongly assert that hedging to freeze profits and accepting profit are literally exactly the exact same net impact, except using the freeze you take on extra risk of double swaps. Unless for some really special reason you are attempting to play games with your account balance curve, there is not any advantage to freezing profit
    You will likely hate me more now:--LRB-

    Still playing around with my test EA to figure this out. Your script is in new(er) mql version with constructs that I am not very familiar with this please bare with me (keeping the benefits or flaws of hedging aside for a minute). I've stumbled upon a pretty decent microscopic reversion to mean gt; Flip gt; Diversion from Mean gt; Flip gt; Reversion to Mean....an always-in egy triggered by a razor sharp single guide entrance. Works great in demonion but may not be practical for live trading. So leaving all that aside, here's what I did:EA waits for the MIN_LOT (0.01 lotsize) Guide entry EA detects the guide order and goes into binge mode... adding 100s of orders using all of the available free margin (There is a tick based filter that's similar to my other OHLC automation therefore it's not a blind advancements ) If Equity explodes, I keep adding each single time freemargin gets positive and exceeding the necessary margin for a single min_lot. . .giving me more and more buying power with equity explosion If Equity depletes resulting in a quick approach towards STOPOUT level (typically at 50% margin), I activate my MarginCallPrevention routine that triggers a semi close of a single min_lot at a time... this slows the decend and gradually frees up margin. If equity retains depleting with not retrace, I am left with anything Equity is at 50% margin. If equity stinks, I create 200-300% per guide entry activate... ending with a RR of 1:4 ... all good for broker competions or a little account but a bit impractical for bigger size accounts. When my goal profit is attained:I calculate the total place size across all transactions and start a hedge position of the size... that frees the profit. Then immediately after, I pulled the code from CloseByHedge() function in your script that's called from my EA. This triggers a closeby exiting all open positions.




    Question: When I do a Guide CloseBY (multiple) from within the terminal, the departure of all open positions is instantaneous using all positions wiped clean in a micro second but once I call your purpose, it closes one at a time. Am I doing this right? Could I mimic the closeby manual option in my EA?

    Here is the code.

    Inserted Code void CloseByHedge() int Total; for(int s=0;slt;OrdersTotal();s ) string symbol = OpenOrderSymbol; for(int I=OrdersTotal()-1;igt;0! IsStopped();I--) if(OrderSelect(I,SELECT_BY_POS) OrderSymbol()==symbol OrderType()lt;2) int form = OrderType(); int ticket = OrderTicket(); for(int j=i-1;OrderSelect(j,SELECT_BY_POS);j--) if(OrderSymbol()==symbol OrderType()lt;two OrderType()! =type) if(! OrderCloseBy(OrderTicket(),ticket)) Printing (OrderCLoseByError:,GetErrorMessage(GetLastError() )); I=OrdersTotal(); break; // End of CloseByHedge() //

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.