Maximum overkill Close-All script - Page 5
Page 5 of 846 FirstFirst ... 3456 LastLast
Results 41 to 50 of 52

Thread: Maximum overkill Close-All script

  1. #41
    Quote Originally Posted by ;
    quote You will probably hate me 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'm not quite familiar with so please bare with me (maintaining the benefits or defects of hedging aside for a moment ). I have stumbled upon a pretty decent microscopic reversion to imply gt; Flip gt; Diversion from Mean gt; Flip gt; Reversion to Mean....an always-in egy triggered by a razor sharp single manual entry. Works great in demonion but might not be practical for live trading. So leaving...
    No, you cannot perform multiple-closeby programmatically, and iterative closeby is the nearest you'll get to mimicking it. That said it seems like you are attempting to filter out the closeby pattern by symbol and magic. I would use a recursive func like this.
    Inserted Code bool multiple_closeby(const string symbol=NULL, const int magic=NULL) for(int I=OrdersTotal()-1; igt;0; --I) return true;

  2. #42
    Quote Originally Posted by ;
    quote No, you can't do multiple-closeby programmatically, and iterative closeby is the closest you will get to mimicking it. That said it seems as if you're trying to filter the closeby pattern by symbol and magic. I'd use a recursive func like this. Bool multiple_closeby(const string symbol=NULL, const int magic=NULL) { for(int I=0; OrderSelect(I, SELECT_BY_POS); I ){ if(OrderType() lt; two (symbol == NULL || OrderSymbol() == symbol) (magic == NULL || OrderMagicNumber() == magic) ){ int first_ticket = OrderTicket(); string first_symbol...
    Thanks man. This explains why I experienced a very small bit of slippage when comparing my account balance and equity prior to hedge and after conclusion of the purpose. With guide multiple closeby, there's absolutely no slippage.
    I learnt a lot from this project so thanks for generously sharing the code. It truly helps to tweak and play around on your own to truly understand the internal workings of leveraged margin accounts. I bet many only trade looking at charts without actually comprehending. I know I was like this for over 4-5 yrs clicking buttons like a monkey and going nowhere:--LRB-

    EDIT: Just FYI - I discovered a bug inside MT4 mobile. After the conclusion of the script, the balance and equity between MT4 mobile and Terminal are not synced immediately. I needed to exit the terminal, log into my (demo) account for MT4 mobile to reflect the netting.

  3. #43
    Quote Originally Posted by ;
    quote This doesn't clarify the slippage. It doesn't matter how much time it takes to perform the closeby, and there's absolutely no difference whether it's instantaneous or requires some time to iterate. Slippage can only occur in the order procedure.
    I'm in the U.S. and at present, I do not use any offshore brokers. U.S. brokers do not allow hedge orders so this topic is less familiar to me, and that I can not take advantage of it.

    But if I used a hedging broker, I'd definitely use this technique to first hedge (to close) my position, and then match the orders to clear it up. As Nicholishen states, slippage can only occur in the order procedure.

    Regarding true slippage by brokers, it appears to me one can open the hedge utilizing Limit orders, which can be less likely to slippage than when I click Close of an existing order (that is always a Market Order; who understands exactly what games Brokers play with those elastic prices).

    Guess one has put the equal hedge. You think you know what your account balance is, BUT, you have not actually used closeBy to offset them yet. As open orders, each Buy and Sell still depend upon the Bid and Ask price. There is a spread and that could vary. Let's say your 1st set of orders are Buys, which signify a profit(or loss) based on the Sell(Bid) price. When you start your single offsetting hedge Sell order, to neutralize your position, originally it's a Sell order that, once open, is then assessing the Buy(Ask) price to signify a profit for this trade.

    So... can there be quite a tiny change of your account balance *displayed* based on the way in which the spread fluctuates? Your 1st collection of Buy orders show profit(loss) based on Bid, but the hedge Sell order shows profit(or loss) based on Ask.

    Your authentic profit is based on the spread right now you opened your hedge, but you may not know that exact sum until you meet up and shut all the orders.

  4. #44
    Quote Originally Posted by ;
    The objective of this script is to minimize risk in most situations, particularly when the shit hits the fan. This script provides the very best and the quickest possible risk mitigation available thru MT4 by utilizing some unique logic not found in any other close-all scripts. Operation Overview: Web places are calculated per emblem (sum of open trades). Symbols are prioritized to manage net-positions from larger (more risk) to smaller. Hedge orders are sent in the order of priority to close exposure at once irrespective of the amount of trades. After...
    Could you use this script close all while conducting a EA??? Neewbee question but I am not sure...

  5. #45
    Quote Originally Posted by ;
    quote The manula multiple near functions fine since it is shutting all hedged trades in a single tick across both buys and sell place. Makes sense to just hedge then do a manual multiple near by.
    I am sorry but you missed the point entirely. The sole difference between closeby and multiple closeby is visual understanding. There's no difference.

    Think of it like this, you buy 1 lot @ 1.0 and another one @ 2.0. You execute a sell for 2 lots @ 3.0. What is your position? It is zero. You don't have a position. Even though you still find orders, lights, and bells going off in the terminal commerce window you already have effectively completed a round-trip transaction. I.e. [in] @ 1.0 [out] @3.0.

    You need to separate place direction and order reconciliation in mind. Closeby and mulitple-closeby are balancing mechanics and do the exact same exact thing in only a slightly different way. There's no monetary benefit of using manual multiple closeby over programmatically iterating closebys one .

    Quote Originally Posted by ;
    quote Could you use this script while conducting a EA??? Neewbee query but I am not certain...
    Yes.

  6. #46
    I am asking again can this shut all be used togheter with a Grid EA say if drawdown comes overly 35-40% do you have this cript working collectively with a EA soo all possisions shut if a % of drawdown?????

  7. #47
    Quote Originally Posted by ;
    I'm asking again can this shut all be used togheter with a Grid EA state if drawdown comes overly 35-40% can you possess this cript working collectively using a EA soo all possisions shut if a % of drawdown?????
    That is a script. What You're asking for can be done but needs to be integrated with the EA... Or programmed as a separate ea to monitor and act on the situation

  8. #48
    Quote Originally Posted by ;
    quote This is a script. What you're asking for can be done but needs to be integrated together with the EA... Or programmed as a separate ea to monitor and act on the position
    Therefore its not prepared as is overly puton a chart for close all at any point?? It requires reprograming?? Mayby I'm wrong,but I doo belive its impossible too have 2 EA's running exactly the same chart,but it might go on a chart by itself...

  9. #49
    Subs. Keep up the fantastic work. Due
    and Regards

  10. #50
    Quote Originally Posted by ;
    quote So that its not prepared as is overly puton a chart for near all at any point?? It requires reprograming?? Mayby I am wrong,but I doo belive its not possible too have two EA's running exactly the same chart,but it can go on a chart by itself...
    Progr don't just magically start doing exactly what your mind has planned for it yes you'll have to program it to your specific needs, and have you ever considered the possibility of opening two charts for the same symbol? Two charts....two EAs.

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.