Hi Diego,acostafulano » Wed Nov 23, 2016 4:52 am wrote:Even though my demos are running great, I would still understand exactly how the closure logic works in order to be more comfortable when going live eventually.
The exit logic in GridMaster 1.8 has already been explained twice in this thread, but judging from your post, it is still not understood, so I will attempt a third and last time.
GridMaster has three distinct exit rules:
1. Send an RnR-message to all the Dancers if current equity has fallen below EquitySL or current equity has risen above EquityTP.
2. Send an RnR-message to all the Dancers if the total floating unrealised profit of all the open trades combined exceeds the given BasketProfit.
1. and 2. are easy to understand. The third rule is what people are struggling with. Let's go back to GridMaster 1.3 to see what the problem was with that version. Take your list of open trades: these are nicely sorted in descending order of PIPs, for convenience. GM 1.3 would take the bottom trade, ( BUY 0.01 GBPUSD at 1.24259, currently -$0.56 ) as it is the biggest loser. It would subsequently offset that trade with winners, starting from the top (i.e. the biggest winners), such that the total profit would exceed MinProfit (let's say, for example, $5.00). So, GM 1.3 would close (BUY 0.01 GBPUSD at 1.24259), together with the top 4 winners (BUY EURJPY, SELL AUDUSD, BUY CHFJPY, BUY USDJPY) for a total profit of $6.30. Check!
There is nothing wrong with this strategy except that always, over time, one or more pairs got into a situation like this: I am not going to present a mathematical or logical explanation for this phenomenon, but this is purely empirical, based on doing lots of forward testing with GM 1.3. This is a nail in the coffin for GM 1.3, as the band of BUYs above the market price and band of SELLs below the market price seemed to get wider and wider, resulting in a drawdown from which version 1.3 could not recover.
GM 1.8 is attempting to resolve these hedges. How? If and when one or more pairs do have hedges, GM 1.8 picks up the biggest losing hedge (from all the pairs and from all the hedges for a pair). Typically, that would be the highest BUY and the lowest SELL of a particular pair. To close this selected hedge will become the target and main focus of GM 1.8, and it will succeed if it can find winning trades of other pairs, such that the total profit exceeds MinProfit. This is in essence how the third exit rule works in GM 1.8. So, each time GM 1.8 manages to close a few trades according to this exit rule 3, there is one hedge less to worry about.
To come back to your list of open trades: In that list, none of the pairs is in a hedge situation. So, GM 1.8 has no opportunity to close trades based on rule 3.
You might ask: How is it possible that a pair has both BUYs and SELLs open at the same time? Answer: The Dancers are opening trades in the direction of the most recent HGI signal and it is possible that HGI 'changes it's mind' about the direction.
I believe that GM/GD has the potential to become a reliable bot. However, when I see a weakness, I try to 'plug that hole'. The hedge-closing mechanism was a response to the widening hedges. The Max Currency Exposure filter was a response to the problem created by the Dancers opening a gazillion of trades in a falling market. Let's see what's next.
Anyway, I hope that this clarifies the closing mechanism in GM 1.8 foregood.