Forex Factory (https://www.forexfactory.com/forum.php)
-   Platform Tech (https://www.forexfactory.com/forumdisplay.php?f=69)
-   -   Maximum overkill Close-All script (https://www.forexfactory.com/showthread.php?t=716973)

Nicholishen Sep 21, 2018 1:10pm | Post# 61

{quote} Thanks man. This explains why I experienced a tiny bit of slippage when comparing my account balance and equity prior to hedge and after completion of this function. With manual multiple closeby, there is absolutely no slippage. I learnt a lot from this endeavor so thanks for generously sharing the code. It really helps to tweak and play around on your own to truly understand the inner workings of leveraged margin accounts. I bet many simply trade looking at charts without truly understanding. I know I was like that for over 4-5 yrs clicking...
This doesn't explain the slippage. It doesn't matter how long it takes to perform the closeby, and there is no difference whether it's instant or takes hours to iterate.

Slippage can only occur in the order process. For example, if you're using a stop order with size to close out multiple positions then you'll likely get slippage because brokers like to slip large stop/market orders. Other than that there is no possibility to introduce any amount of slippage using this method.

pips4life Sep 21, 2018 4:03pm | Post# 62

{quote} This doesn't explain the slippage. It doesn't matter how long it takes to perform the closeby, and there is no difference whether it's instant or takes hours to iterate. Slippage can only occur in the order process.
I'm in the U.S. and at present, I don't use any offshore brokers. U.S. brokers don't allow hedge orders so this topic is less familiar to me, and I can't take advantage of it.

But, if I used a hedging broker, I would certainly use this technique to first hedge (to close) my position, and then match up the orders to clear it up. As Nicholishen says, "slippage can only occur in the order process".

Regarding true slippage by brokers, it seems to me one could open the hedge using "Limit" orders, which are less prone to slippage than if I just click "Close" of an existing order (which is always a Market Order; who knows what games Brokers play with those "flexible" prices).

Suppose one has placed the equal hedge. You think you know what your account balance is, BUT, you haven't 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 can vary. Let's say your 1st set of orders are Buys, which indicate a profit(or loss) based on the Sell(Bid) price. When you open your single offsetting hedge Sell order, to neutralize your position, initially it is a "Sell" order that, once open, is then checking the Buy(Ask) price to indicate a profit for THAT trade.

So... could there be a very tiny fluctuation of your account balance *displayed* based on how the spread varies? Your 1st set of Buy orders show profit(loss) based on Bid, but the hedge Sell order shows profit(or loss) based on Ask.

Your true profit is based on the spread at the moment you opened your hedge, but you might not know that exact amount until you match up and close all the orders.

VEEFX Sep 21, 2018 6:01pm | Post# 63

{quote} I'm in the U.S. and at present, I don't use any offshore brokers. U.S. brokers don't allow hedge orders so this topic is less familiar to me, and I can't take advantage of it. But, if I used a hedging broker, I would certainly use this technique to first hedge (to close) my position, and then match up the orders to clear it up. As Nicholishen says, "slippage can only occur in the order process". Regarding true slippage by brokers, it seems to me one could open the hedge using "Limit" orders, which are less prone to slippage than if I just...
You got this so right bro. This is what I also think happened. The idiotic pippete fluctuation on spread over 100s of trades could make a significant difference. Bottom line: broker gets us one way or the other. The manula multiple close works fine because it is closing all hedged trades in a single tick across both buys and sell position. Makes sense to just hedge and then do a manual multiple close by. Anyways, this was just a mini-project undertaking to remain sharp with trading small and aggressively with an offehore broker. I doubt it will work in a live environment. Small blow upd might be ok if done correctly :-)
I think this trip hniwue also helps with practising razor sharp entries do need a bit of more work in this space as a strategy to compliment my main core strategy of 'entries are not important' :-)

And frankly, this is particularly powerful on pairs with the lowest required margin. Think about it....more buying power, more averaging up and more explosion with contained downward risk :-)

magne999 Sep 22, 2018 12:02pm | Post# 64

The goal of this script is to minimize risk in all situations, especially when the shit hits the fan. This script provides the best and the fastest possible risk mitigation available thru MT4 by utilizing some unique logic not found in any other close-all scripts. Operation Summary: Net positions are calculated per symbol (sum of all 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 all exposure at once regardless of the number of trades. Once...
Can you use this script close all while running a EA???Neewbee question but i am not sure...

Nicholishen Sep 23, 2018 6:34pm | Post# 65

{quote} The manula multiple close works fine because it is closing all hedged trades in a single tick across both buys and sell position. Makes sense to just hedge and then do a manual multiple close by.
I'm sorry but you missed the point entirely. The only difference between closeby and multiple closeby is visual perception. There is no other 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's zero. You don't have a position. Even though you still see orders, lights, and bells going off in the terminal trade window you already have effectively completed a round-trip transaction. i.e. [in] @ 1.0 [out] @3.0.

You need to separate position management and order reconciliation in your mind. Closeby and mulitple-closeby are reconciliation mechanisms and do the same exact thing in just a slightly different way. There is no monetary benefit of using manual multiple closeby over programmatically iterating closebys one by one.

{quote} Can you use this script close all while running a EA???Neewbee question but i am not sure...
Yes.

magne999 Sep 24, 2018 7:29pm | Post# 66

I am asking again can this close all be used togheter with a Grid EA say if drawdown comes too 35-40% can you have this cript running together with a EA soo all possisions close if a % of drawdown?????

Nicholishen Sep 25, 2018 1:10am | Post# 67

I am asking again can this close all be used togheter with a Grid EA say if drawdown comes too 35-40% can you have this cript running together with a EA soo all possisions close if a % of drawdown?????
This is a script. What you are 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 position

magne999 Sep 25, 2018 2:15am | Post# 68

{quote} This is a script. What you are 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 position
So its not ready as is too puton a chart for close all at some point??It needs reprograming??Mayby i am wrong,but i doo belive its not possible too have 2 EA's running on same chart,but it can go on a chart by itself...

goodways100 Sep 25, 2018 2:21am | Post# 69

Subs. Keep up the good work. Thanks
and Regards

Nicholishen Sep 25, 2018 9:25am | Post# 70

{quote} So its not ready as is too puton a chart for close all at some point??It needs reprograming??Mayby i am wrong,but i doo belive its not possible too have 2 EA's running on same chart,but it can go on a chart by itself...
Programs don't just magically start doing what your mind has intended for it so yes you will need 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.

magne999 Sep 25, 2018 4:06pm | Post# 71

1 Attachment(s)
{quote} Programs don't just magically start doing what your mind has intended for it so yes you will need 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.
LOL that was i good idea,,,,,No i didnt think of that...Thanks...HAHAHA
Name:  Buzzfeed.jpg
Views: 94
Size:  76 KB

MoneyZilla Feb 5, 2019 8:02am | Post# 72

5 Attachment(s)
Hello Girls,

i have been inactive for quite some time. Lost $20k with MtCook, on a live. I hope Twee had a nice Christmas, by reverse trading my positions. Unfortunately for the cash in the account, I was overconfident. Was reading the timing signals in a reverse way, sadly. But that have turned out to be a very good thing for me. At the end...

It turns out this is my last post here, most likely. So, it will be kind of a long one. Sorry about that.

First I will start with hedging.

ATM there are three ways to hedge, that I know of, that completely and entire puts the whole house of cards down. These funny bankers, they have built a solid house of cards. I could not believe my eyes when I saw the very first way to hedge (of the three that I do know about). I wont show you how to do it. I might have a low IQ of 75, but it does take a lower than that IQ value, for a moron to share that kind of thing, publicly. So Mr. Banker can sleep now, well. At ease Mr. Banker. Do not worry. Your house of cards will stay as strong as a fortress, as it was during the last 200-300 years and especially during the last 100 years.

So, hedging? When I had the DD of nearly -12k, I started to desperately look for ways to avoid that to happen... in the future. At that moment in time, I was not aware I was reading the timing signals in a reverse way. Reverse means wrong. Upside down. Anyways. For nearly 2, maybe 3 weeks I had slept less than 3 hrs per night. And I did not get tired. At all. This is where I have found how to hedge anything. I will only share with you the following: to hedge properly you must start with TWO trades into the same direction. And at the moment of the placement of those two trades, you have to be in the direction of the present movement, i.e. two stop orders, if I can say so. But, again, it takes a good knowledge on how to determine and define a direction. Then one of the trades locks down the distance traveled into the same direction. Sooner or later, when they trend move it, that is inevitable to happen. And if the trend continues, usually 2-3-4-5 consecutive months in a row throughout the year, the counter trending trade will release and lock in each time the trend expands. Pretty much trading for idiots. Open-Lock-Open-Lock, ext. That is it. All you need to know why there are peaks and lows on the chart? If you do not know that and there is no public information about this, naturally, you cant make it right. However, beware, it is not as simple, as it sounds. Once you realize it, it is really the simplest thing ever crossed your empty fx addicted brain. Likely, almost everyone of you wont get there, unfortunately. That's about hedging way one. That is the simplest of all three.

Speaking of losses, $20k is like 4 ebikes for me. I count everything in ebikes. I am an ebike freak. A loss of 4 ebikes is a huge loss for me, now. Previously, a loss of 20k would have been a loss of less than a month of a regular income for me. But the ebikes changed everything in me... I have lost 4 ebikes. I love to experiment with bosch, shimano, yamaha, tq, brose, ext. crank motors. Having 7 ebikes already, of which just one premium, 3 regular and 3 chinesse with a bafang ultra motors. In 2019 I will buy at least 3 new high end models, probably 3. No more chinesse ebikes. I took those off my desire list. So $20k is a huge loss. My 2019 ebike budget is something like that. A tragedy had happened to me... I do friendship with kids. When I tell them they are stupid. They understand why. I hate adults. Very much hate adults. When I tell them they are stupid, they jump on me. Morons. So, 4 more ebikes would give me at least 2-3 new kids friends. We ride up in the mountains. Uphill only. Kids can be so intelligent. Hard to imagine. The stupid adults just kill their intelligence and turn them stupid alike, when they grow up. That is the reality. Over 95% of male adults, especially the male adults, are just plain fucking stupid. They make their kids alike. And the Mothers? They see how truly stupid the fathers are and they panic and stop thinking rationally and they make the things even worse when they try to avoid the kid to look like his/her stupid father. It takes a low IQ of 75 to see and understand that. Higher IQ is a barrier, it does put a curtain. It does block the sight. Having a higher IQ, makes you think you are smart. Yeah, right...

So, one tragedy leads to another, for most. For those with a low IQ, like mine, a tragedy leads to a lesson. Pretty damn good lesson.

Why I gave you a clue on how to hedge, although knowing you wont figure it out anyway? Because this simple hedge way no.1 is delivering low returns. Like 50% a year, or less. Not interested. But maybe you are? And why spoil the game? Lets keep it as it currently is... I hope you wont get it, so the game will never change. It has not being changed for the last 8-9 years at least. I have scanned it back from 2009 and nothing had changed in the game since then. Thanks Got/Lort.

Now, Girls, lets get to the core of my last post here.

On a fare well, I would like to share something very valuable with you. This is what interests me. This thing can make hundreds of % in return, for about a week. For about a month, it might get into the thousands of % in return. Well, that is with my in-house built losing hedging strategies and losing hedging indicators. I suppose you all are not much different than I am...

Here is the thing. Many of you think, if a strategy is a loser, to simply reverse it. That is never going to work... But, if you make a map of how things look like and use this map as a second or a final filter? Well, this draws an entirely different picture... A losing hedging strategy that simply struggles the way down, can boost your account in the zone of 30-40-50% daily and over 200-300% weekly, if you have the balls to hold her and trust her for about 200-300 pips on the W1 candle. I am talking about your strategy. Whatever that is. Well, there will be bad days/weeks. But trust me, they are 3-4 times lesser than the good ones...

With my CloseZilla 1.40, you can fast close one of multiple pairs. Have removed all closing bugs known so far. As a core engine, she uses, partially or fully, the hedge close all script of Mr. Niko from this tread. With little checks and probably improvements included, if there is no close by function supported by the broker, for example.

But that is NOT what CloseZilla is all about. Not for me. And I am a nice person, in between the 99% of the time when I am a pure asshole... So I am nice now and I am sharing this potentially broker killing EA. She could be. She should be. Have you ever drawn a map of your hedging strategy? If it is a lame one? It gotta be a lame hedging strategy of yours. I know you. Have you ever examined when and where exactly the net lot takes over? Even with just 0.01 lots difference for one of the sides? Where there are more buys left than sells? Or vise versa? Have you ever visualize that? As a final filter? While continuing to open buy and sell trades according to your lame hedge criteria? This could be a very interesting map, by the way... I am telling you. Brokers down to tears. That is what will follow, if you catch properly how to use her.

Reverse the loser? Not necessary. Map the loser. And stick the wet carrot right into that broker's smelly hole. Revenge. This will create chaos. It is hard to fight against the map. It is easy to kill any strategy possible, but the map? Really? The map goes with the trend. And it draws a different route. Always.

I can, but I won't visualize her. I leave the hard work to you. Most of you are lazy MFs. This EA is for those who are not...

I am also attaching a signal sender and receiver. You can run your loser on a demo and transfer the net lot map to another demo, or a live. As long as all terminals you are transferring signals from and to are on the same server.

I am also attaching a signal hedger. In case you want to reverse the net lot map. For the limit orders hedge fans, this might be quite useful.

Because I am a nice guy asshole, at the moment, I wont reply to any questions and I wont explain anything at all. This is a half holy grail set. You can see things you never knew about your losing hedging approach. I will give you one small example. Imagine, you have the IQ required to know how to accumulate the heavier buy lot, in a buy movement, against the lighter sell lot, naturally, it should be lighter, while the rate slowly goes higher and higher and higher? But you never know when they will turn the movement down there? And that is precisely why you do open your sells, just in case that thing happens? But the buy movement goes on, yet being heavier on the buys, still results in a negative trading balance? That is forex all about, right? It is hard to beat. Not with a strategy. I think, with a strategy - it is impossible to beat forex. Forex randomizes the buys and the sells. See this? x + y = 4. There are indefinite combinations here. You cant guess it right. No one can. Forex can be beaten with her own flaws only. One and only, through her flaws. It is not really hard. She does have flaws big as a black hole in the Milky Way. In fact I have no idea how they can eventually fix this... So, imagine you are in this situation? Heavier on the buys, than the sells, rate goes higher. You always need more pips, just to break even? There, usually, they will change the direction. Hello draw down. Again. Even more draw down...

Do you catch the example so far? If you did, what will follow, is CloseZilla will show you only buy signals... Throughout the whole buy movement. You wont open a single sell. In a buy movement, you wont open a sell trade. Ever or most likely. It is a killer. You need an IQ of 75, at least, to understand it... Higher IQ might be a problem. Keep it simple, cause it is simple. But you cant guess right. never, ever how much is x and how much is y in x + y = 4. Trying guessing it right, and you will get killed. Your account will. By the way, they show exactly how much is x and how much is y, as a timing. The now shows the future. But because this is my last post here, I am out of space and time, so I cant say a word about that...

That is all from me, Girls. Wish you good luck, for the hard workers. For the lame and lazy - GFY.

p.s. I have decided I can attach a trend line indicator. It could be really useful to trade the net hedge lot as a signal with her. If just one guy succeeds, using these instruments, I will be happy and glad I could help. I hope none does, but one guy, wont change the game, so I am all OK...
CloseZilla 1.40.mq4
HitZilla RT Copier - SENDER.mq4
HitZilla RT Copier - RECEIVER.mq4
RT Hedge 1.00.mq4
RT TrendLines 1.21.mq4

AntiCre Feb 5, 2019 9:19am | Post# 73

It turns out this is my last post here, most likely.
I hope it won't be. But if it is, I'd like to wish you succcess, happiness and health in the future!

MoneyZilla Feb 5, 2019 10:15am | Post# 74

{quote} I hope it won't be. But if it is, I'd like to wish you succcess, happiness and health in the future!
Thanks. yeah, you guess it right!

Let me tell you one last thing. I have built an EA that is the best thing I have ever seen in range. She does revert the crappy half trend indicator. Making 500-600% monthly. In a ranging month. All limit orders. Offset like 5 pips away from the signal spot. Buy limits, then sell limits, ext. When trend comes, the EA has a heavy wrong end lot. Killing the account, eventually. I have abandoned this EA some years ago. Don't even remember now how she did work. My cousin, uses her, so he will help me to recall the major idea behind.

Now, with CZ 1.40, I can copy and revert 90-100% of all trades and into another EA can hedge, literally, the wrong end losing lot, when the 3-10 days range is no more. This means, that is the limit EA opens 20,000 0.01 lot trades and closes like 10,000 of them, at 30 pips each, The hedging EA that reverts the net lot signals reported by CZ 1.40, will have 20,000 trades, each 0.01, after the flipping, there will be flips, naturally, it is a range, probably having just one trade like 16-17 lots and some 300-400 single 0.01 lot each.

Which means, the limit EA holds like 10 lots of wrong direction trades, versus 20 lots of right direction trades. The 20 lots will have a lot of expenses, cause it does need to flip. The question here is, will the stop EA flips be bigger than 30 pips as the individual limit EA trade TP is or not? My educated guess is the flips will be with times fewer in number, as the net hedge lot map is completely different animal, in a first place. And also, some of those flips, which lower in numbers, will end up in profit, too.

That is quite typical scenario. 30k banked for a week usually, by the limit EA, and then lost the next week when the rate moves some 300 pips into a direction.

This example has nothing to do with what I am interested at. I spend time to write it as a little example, how one can perfectly hedge a limit hedge loser and eventually the whole package to be in the positive area, not having any DD, before the range breakout happens, when the whole accumulated lot in the limit EA, including the closed trades, will remain open in the stop EA. When the movement comes, the stop EA will have 2 to 4 and even more times higher lot than the wrong lotted limited EA, at the time of the movement.

It is just an example. I might have to delete everything tomorrow. If it works with a stupid limit EA vs a stop hedge by the reverted CZ 1.40 RT signals? Shit! This might disturb Mr. Banker and that is the least and the last thing I want to do here...

AntiCre Feb 5, 2019 1:05pm | Post# 75

I have built an EA that is the best thing I have ever seen in range.
Seems like you found a way around this scenario. Sounds really great. Congrats!

mohsinali Feb 24, 2019 2:50pm | Post# 76

1 Attachment(s)
Hello dear money zila...best of luck...
Try this...if you have deep pockets you should ..
Click to Enlarge

Name: Screenshot_2019-02-11-20-42-19.png
Size: 204 KB

EnrichWave May 5, 2019 2:36am | Post# 77

anyone having CloseZilla for MT5?

Kind Regards


© Forex Factory