Thanks, I just posted my proposed variant I've been considering here:
http://www.stevehopwoodforex.com/phpBB3 ... 824#p20824
I hope someone creates it!
I'm currently experimenting with a 2x lot multiplier with about a 10 pip TP and 13 pip grid on G+ and an 8 pip box range with only a 1 box length and timeframe to make it a continuous trader, because I noticed one can trade a couple pairs and still make decent profits. Still someone would have to implement the two changes I posted before I could take it live, and would prefer the modification I proposed.
I just got margin called on a 50:1 account trading 4 pairs with beginning .01 lot and 2x multiplier with a $9k balance. After all my trades closed and new ones started soon after since I have it on near continuous entry, I see there is a problem with a miscalculation of lots:
Gertje plus Squalou plus Forexhard EA
-
Fx93
- Trader
- Posts: 83
- Joined: Mon Apr 09, 2012 6:32 pm
Re: Gertje plus Squalou plus Forexhard EA
You do not have the required permissions to view the files attached to this post.
-
SteveM
- Trader
- Posts: 20
- Joined: Wed Dec 21, 2011 11:52 am
Re: Gertje plus Squalou plus Forexhard EA
Did you solve this?Fx93 wrote:Here in the pic below is a definite error that could cause trouble. There was first a buy that hit its 15 pip TP immediately, but since it was night I didn't manually togglle trading on/off to remove the sell line. Price then went down and hit the sell line and opened a sell. The problem is the EA still assumes it is part of the last trade, and so doesn't open up a potential buy grid.
So basically after a trade hits the TP the opp line needs to disappear.
I tried to change the DeleteRemainingPendingLines routine, which deletes the buy and sell grid, but the changes made the EA stop trading, it would delete the first two lines immediately one was crossed.
I will try a few other things when I have the time to watch it running as this is a serious flaw.
I have gone back to TP=100 pips but have added a jumping stop loss based on pips rather than cash amount and this has helped. Basically if have something like
if PipsUpl > PipsSL*3 +300 then PipsSL=PipsUpl / 3
So at 30 pips profit, SL is set at 10. It seems to have reduced the big swings and still lets the trades run with the trend
-
SteveM
- Trader
- Posts: 20
- Joined: Wed Dec 21, 2011 11:52 am
Re: Gertje plus Squalou plus Forexhard EA
It appears that different exit methods use different cleanup methods after closing trades. In this case it is not resetting the lot size so you would have to figure out what caused the previous trade to close and check the routine.Fx93 wrote:Thanks, I just posted my proposed variant I've been considering here:
http://www.stevehopwoodforex.com/phpBB3 ... 824#p20824
I hope someone creates it!
I'm currently experimenting with a 2x lot multiplier with about a 10 pip TP and 13 pip grid on G+ and an 8 pip box range with only a 1 box length and timeframe to make it a continuous trader, because I noticed one can trade a couple pairs and still make decent profits. Still someone would have to implement the two changes I posted before I could take it live, and would prefer the modification I proposed.
I just got margin called on a 50:1 account trading 4 pairs with beginning .01 lot and 2x multiplier with a $9k balance. After all my trades closed and new ones started soon after since I have it on near continuous entry, I see there is a problem with a miscalculation of lots:
You may find that, because the EA was never intended to operate on single trades, that is causing the problem. I had a similar one when I was working out my Pips Stop loss routine, it wouldn't reset the stop loss to zero afterwards so as soon as a trade opened it was closed with the stop loss.
In the end this is an experimental EA and I think those that started it have moved on to other, possibly more profitable, projects. As soon as I can get some time to read I'll start looking into the Nanningbob threads as that seems to be where the excitement is at the moment even though this shows great promise.
-
Fx93
- Trader
- Posts: 83
- Joined: Mon Apr 09, 2012 6:32 pm
Re: Gertje plus Squalou plus Forexhard EA
No SteveM, the change I detailed remains unresolved, which prevents me from trying to go live with it. The second issue with the opposite line going to the middle of the box I don't like, but it isn't crucial.
-
SteveM
- Trader
- Posts: 20
- Joined: Wed Dec 21, 2011 11:52 am
Re: Gertje plus Squalou plus Forexhard EA
I think I may have sorted out the issue with the lines not being deleted, I'll run it for a bit and check to make sure.
The line half way down the box rather than at the bottom can be fixed by making the following changes:
Find this code
Under '//Move the pending sell' place a /* and under ' }//if (ObjectFind(falltoline) > -1)' place a */ which will ignore the code to move the pending line.
When done it will look like this
A bit further down you will find almost the same code repeated but with 'risetoline' and 'falltoline' swapped. Make the same change there.
The line half way down the box rather than at the bottom can be fixed by making the following changes:
Find this code
Code: Select all
bool result = SendSingleTrade(type, TradeComment, SendLot, price, stop, take);
if (result)
{
if (name == risetoline) SetUpBuyGrid();
//Move the pending sell
if (ObjectFind(falltoline) > -1 && OpenTrades == 0)
{
double ltarget = ObjectGet(falltoline, OBJPROP_PRICE1);
double extent = (PendingPrice - ltarget) / 2;
price = NormalizeDouble(ltarget + extent, Digits);
ObjectMove(falltoline, 0, Time[0], price);
}//if (ObjectFind(falltoline) > -1)
ObjectDelete(name);
When done it will look like this
Code: Select all
bool result = SendSingleTrade(type, TradeComment, SendLot, price, stop, take);
if (result)
{
if (name == risetoline) SetUpBuyGrid();
//Move the pending sell
/*
if (ObjectFind(falltoline) > -1 && OpenTrades == 0)
{
double ltarget = ObjectGet(falltoline, OBJPROP_PRICE1);
double extent = (PendingPrice - ltarget) / 2;
price = NormalizeDouble(ltarget + extent, Digits);
ObjectMove(falltoline, 0, Time[0], price);
}//if (ObjectFind(falltoline) > -1)
*/
ObjectDelete(name); -
SteveM
- Trader
- Posts: 20
- Joined: Wed Dec 21, 2011 11:52 am
Re: Gertje plus Squalou plus Forexhard EA
I have modified the initial version in the following ways.
Please trial this and let me know if everything works
Added switch - ReverseTradeAtHalfBox
- With this at true the EA sets the reverse trade line half way though the box (as the original did) if false it leaves it at the other end of the box.
Added setting PipsProfitTarget2
- This allows you to have a different target if the trade has both buys and sells.
Added PipsJumpingStopStart & PipsJSLMultiple.
- these let you have a jumping stop in pips rather than cash
- with PipsJumpingStopStart at 30 and PipsJSLMultiple at 3, the Jumping stop will be set at 10 pips when 30 has been reached, then 20 once 60 has been reached etc.
Modified the close all trades routine to better reset some variables. This should prevent things like the trade multiplier not resetting. Also call a routine to delete the initial buy and sell lines that were sometimes not getting deleted.
I have tried to compile several sets of modifications from several different demo versions I have running into the one file so it may not work as required. Please test for yourself before trying it on a live platform.
Please trial this and let me know if everything works
Added switch - ReverseTradeAtHalfBox
- With this at true the EA sets the reverse trade line half way though the box (as the original did) if false it leaves it at the other end of the box.
Added setting PipsProfitTarget2
- This allows you to have a different target if the trade has both buys and sells.
Added PipsJumpingStopStart & PipsJSLMultiple.
- these let you have a jumping stop in pips rather than cash
- with PipsJumpingStopStart at 30 and PipsJSLMultiple at 3, the Jumping stop will be set at 10 pips when 30 has been reached, then 20 once 60 has been reached etc.
Modified the close all trades routine to better reset some variables. This should prevent things like the trade multiplier not resetting. Also call a routine to delete the initial buy and sell lines that were sometimes not getting deleted.
I have tried to compile several sets of modifications from several different demo versions I have running into the one file so it may not work as required. Please test for yourself before trying it on a live platform.
You do not have the required permissions to view the files attached to this post.
-
Fx93
- Trader
- Posts: 83
- Joined: Mon Apr 09, 2012 6:32 pm
Re: Gertje plus Squalou plus Forexhard EA
Awesome SteveM, did you fix the other side of the grid not closing when a trade hits its TP immediately yet?
-
SteveM
- Trader
- Posts: 20
- Joined: Wed Dec 21, 2011 11:52 am
Re: Gertje plus Squalou plus Forexhard EA
Yes, that's in there tooFx93 wrote:Awesome SteveM, did you fix the other side of the grid not closing when a trade hits its TP immediately yet?
-
Fx93
- Trader
- Posts: 83
- Joined: Mon Apr 09, 2012 6:32 pm
Re: Gertje plus Squalou plus Forexhard EA
Great, thanks Steve, yeah it appears to be working. I got two separate closes of trades that went right to TP. I have it on about continuous trading, so I'll check if there's any weird lot sizing going on with lot multipliers.
-
Fx93
- Trader
- Posts: 83
- Joined: Mon Apr 09, 2012 6:32 pm
Re: Gertje plus Squalou plus Forexhard EA
I left it running last night and when I awoke I noticed a few odd things, but this may be due to me running out of money, but still I think the trades should have closed.
The first with the Euro is a weird case where the "position in pips" reads -828, but I am clearly in profit as may be seen from my open trades in profit of $115.52, so it probably didn't close because of this.
The second with USDCHF shows a "position in pips" of 365, where my TP was 80, so it should have closed but did not. I don't know why, maybe it's all due to the error where I ran out of money with the Euro above.
The first with the Euro is a weird case where the "position in pips" reads -828, but I am clearly in profit as may be seen from my open trades in profit of $115.52, so it probably didn't close because of this.
The second with USDCHF shows a "position in pips" of 365, where my TP was 80, so it should have closed but did not. I don't know why, maybe it's all due to the error where I ran out of money with the Euro above.
You do not have the required permissions to view the files attached to this post.