I find that this code has problems at times keeping the grid perfect (at least when I run it as a pullback not a breakout grid). I've seen holes form and not get updated and I've seen the grid not fully form at times with all 10 orders. Also, it seems to not like update time settings that are very short and I don't understand why. It seems that 15 minutes is way too long to update a grid (more like 15 seconds!) so this is a major problem. I would appreciate knowing if you have experienced any of this. Great job however on getting this going at all. Nice work.
u are right, there was a bug that someone pointed out to me and seems to be fixed. here is the new version. I also changed the interval to 1 min - but I think 15 to 30 mins is better.. it will avoid a few counter trades when the market moves real fast.
Thanks, hdb. But perhaps I don't understand exactly how you think of grids because I can't see a reason why updating too soon would be bad. Missing an entry would keep the grid from it's full potential. When I run it manually, I update orders the second anything changes. I run pullback grids not breakout grids so perhaps that is where the difference lies, but with pullbacks you profit from choppiness and so keeping the grid free of holes is ideal.
Well, i was waiting for a favourable moment to post an update of the grid - since its performane has really been lousy recently. The week after my last update, I was on vacation and the grid was stopped. Last week, the grid was running most of the time. I switched it off a few times when avail margin was zero and set 'longs only' on most of the majors. Today was a super comeback day.
Balance : 93 (+10 since 10 days ago) Margin used : +15k Avail mrg : +28k unreal. p&l : -49k (-11 since 10 days ago) Balance : 44k
Net is 1k worse off than 10 days ago and 5k below starting balance.
The really hard part in all this is trying to limit the drawdown. I really have to find ways of doing this!
I think the only way to avoid the drawdown is to use discretionary methods i.e to know when to stop adding orders and when to like you did stop adding say short positions.
Started with 100K balance after starting off badly by using to large a lot size and being forced to close out loads of positions.
Balance: 97 594.19 Balance about 2 weeks ago 83k Free Margin: 6 016.88 Floating P/L: -38 960.45 was as bad as -56k Margin: 52 616.86
the last couple of days had been really slow margin level was as low as 93%
but now all the majors seemed to have mad a turn around for the time being margin level is back up to about 130%
well what a nice 2 days we had... yesterday saw my grid +5k in the green (equity was 54k, I started with 49k ) after weeks of pretty catastrophic trading.
Now that I am back in a 'reasonable' position, i have set all the currency pairs to do the following: 1) trade only in the direction of positive carry interest (unless the interest is close to 0, then do it both ways) 2) longs only above 34 ema, shorts only below 34 ema 3) for 2 way currencies, use macd on 5 min chart to decide if long or short
thanks for yuor answer ill add you when i get home
u are right, there was a bug that someone pointed out to me and seems to be fixed. here is the new version. I also changed the interval to 1 min - but I think 15 to 30 mins is better.. it will avoid a few counter trades when the market moves real fast.
regards,
yes, maybe u are right.. so the best would be to update frequently but only a few grid slots? needs testing though. I have no strong opinion.
reagrds,
The week after my last update, I was on vacation and the grid was stopped. Last week, the grid was running most of the time.
I switched it off a few times when avail margin was zero and set 'longs only' on most of the majors.
Today was a super comeback day.
Balance : 93 (+10 since 10 days ago)
Margin used : +15k
Avail mrg : +28k
unreal. p&l : -49k (-11 since 10 days ago)
Balance : 44k
Net is 1k worse off than 10 days ago and 5k below starting balance.
The really hard part in all this is trying to limit the drawdown. I really have to find ways of doing this!
i.e to know when to stop adding orders and when to like you did stop adding say short positions.
Started with 100K balance after starting off badly by using to large a lot size and being forced to close out loads of positions.
Balance: 97 594.19 Balance about 2 weeks ago 83k
Free Margin: 6 016.88
Floating P/L: -38 960.45 was as bad as -56k
Margin: 52 616.86
the last couple of days had been really slow margin level was as low as 93%
but now all the majors seemed to have mad a turn around for the time being
margin level is back up to about 130%
A friend also has one with a stoploss running.. and it is struggling to stay afloat! That really does solve the drawdown problem though!
In the meantime, i cleaned up my positions - all positions with a strong negative carry interest and well in loss ( a few 100 pips) were closed.
So my grids now are ready for another hit on the head (margin bact to 430%) !
Lucky we can try on demo accounts!
Now that I am back in a 'reasonable' position, i have set all the currency pairs to do the following:
1) trade only in the direction of positive carry interest (unless the interest is close to 0, then do it both ways)
2) longs only above 34 ema, shorts only below 34 ema
3) for 2 way currencies, use macd on 5 min chart to decide if long or short
We will see what this gives!
ps. I wish the back testing worked!
I have taken your advisor on EURUSD, trading both sides as breakout.
Now I would like to ask you, if you already run in the following problem:
After a while, I have more than one order on some of the same grid positions. Sometimes there are two, but I have also seen 5 and more of them.
As far as I understand the code, only one should be open at a gridposition at a time.
I have messed around converting all doubles to int before comparing because in MQL2 I have found a similar problem when comparing double values.
Did you encounter something similar?
With regards,
cori