stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Joe. Swing-trade your way to a baby equity millipede
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=148
Page 10 of 15
Author:  andydoc [ Mon Dec 12, 2011 10:41 pm ]
Post subject:  Re: Joe. Swing-trade your way to a baby equity millipede

LOL

Any thoughts on numerous SL errors?

Don't worry about the close best half:close worst half argument - close worst is better
Author:  SteveHopwood [ Mon Dec 12, 2011 11:02 pm ]
Post subject:  Re: Joe. Swing-trade your way to a baby equity millipede

andydoc wrote:LOL

Any thoughts on numerous SL errors?
Yes. Remove the reporting code so that the punters are less upset by them, then assure them that what they see in the tabs they consult mean nothing. Then ignore them.

Thing is, I have had Joe running on demo all day and not had an sl error. As I often point out to people, I find it impossible to clear up errors unless they occur on my platform.

When someone produces a problem that arose on a demo, I might be able to solve it or I might not. Most people lack the ability to report the prob in a way that makes any sense. Mostly, what they do is say, in effect, "It dunt wurk." and expect me to sort it out.

Mostly, I sort out problems when they occur on my demo. The rest I tend to ignore 'cos there is bugger all I can do about them.

:D
Author:  gaheitman [ Mon Dec 12, 2011 11:15 pm ]
Post subject:  Re: Joe. Swing-trade your way to a baby equity millipede

andydoc wrote:LOL

Any thoughts on numerous SL errors?

Don't worry about the close best half:close worst half argument - close worst is better
Do we have a candidate version I should be looking at? I would like to go through it and make some changes so that we can easily (well, maybe not easily) track what is going on with the trades. I'd rather not make all those changes and have to move them to a new code base.

My plan is to have a global set of procedures along the lines of

LogOpenTrades() - print out a list of all the open trades with visual notification of breakeven, etc, similar to OrderPrint for each one, except it will automatically do Alerts instead of Prints when in strategy tester.
LogCommonVariables(), print out the contents of TicketNo, OpenTickets, BuyOpen, SellOpen, etc.
LogBasketStats() - print out summary statistics for all open trades, including total profit/loss, etc.

I'd also like to update SendSingleTrade and ModifyOrder to log what they've been asked to do and the results.

Maybe there would be a global LogLevel that controls the amount of information printed/alerted. Still gathering requirements, you see.

Reading Steve's post, it doesn't seem like I'm heading in the right direction... :D

George
Author:  andydoc [ Mon Dec 12, 2011 11:28 pm ]
Post subject:  Re: Joe. Swing-trade your way to a baby equity millipede

LOL Steve, spoken like a true Yorkshireman! :D

George, I am concentrating on my variant which I shall post shortly, I would appreciate you having a look at that - it will, contrary to Steves POV have lots and lots of reporting code if I haven't been able to figure it out!
Author:  andydoc [ Tue Dec 13, 2011 2:14 am ]
Post subject:  Re: Joe. Swing-trade your way to a baby equity millipede

Ok, This is as good as I can make this. It doesn't take the initial FB trade as there are two many fakes. It aggressively stacks on the trends, with an exponential pyramiding multiplier ensuring positions on the trend are broad based.
If the drawdown is too great you can limit the lot down to .01 (I had it at .02 for the attached test, it may also be worth experimenting with the exponential power of the pyramiding if you do drop the lot size.
There are lots of alerts in there (sorry Steve) about where trade send and order modify have come from and their parameters, also one at the end which shows your Margin ratio (*100 to get % :D ) Margin Ratio remained above 500%. (lowest was 538%)

All we need now is a method to trade the flat bits of the equity curve :)

Code: Select all

Symbol GBPUSD (Great Britain Pound vs US Dollar) 
Period 4 Hours (H4) 2011.03.21 00:00 - 2011.05.26 20:00 (2011.03.21 - 2011.05.27) 
Model Every tick (the most precise method based on all available least timeframes) 

Bars in test 1295 Ticks modelled 3213689 Modelling quality 90.00% 
Mismatched charts errors 0     
 
Initial deposit 10000.00     
Total net profit 6070.61 Gross profit 9851.80 Gross loss -3781.19 
Profit factor 2.61 Expected payoff 54.69   
Absolute drawdown 87.92 Maximal drawdown 3019.74 (18.24%) Relative drawdown 18.24% (3019.74) 
 
Total trades 111 Short positions (won %) 71 (23.94%) Long positions (won %) 40 (32.50%) 
 Profit trades (% of total) 30 (27.03%) Loss trades (% of total) 81 (72.97%) 
Largest profit trade 1951.61 loss trade -544.64 
Average profit trade 328.39 loss trade -46.68 
Maximum consecutive wins (profit in money) 8 (2366.90) consecutive losses (loss in money) 14 (-465.17) 
Maximal consecutive profit (count of wins) 3231.17 (3) consecutive loss (count of losses) -930.87 (6) 
Average consecutive wins 2 consecutive losses 6 

StrategyTester Joe2 initial.gif
Author:  SteveHopwood [ Tue Dec 13, 2011 10:15 pm ]
Post subject:  Re: Joe. Swing-trade your way to a baby equity millipede

andydoc wrote:Ok, This is as good as I can make this. It doesn't take the initial FB trade as there are two many fakes. It aggressively stacks on the trends, with an exponential pyramiding multiplier ensuring positions on the trend are broad based.
If the drawdown is too great you can limit the lot down to .01 (I had it at .02 for the attached test, it may also be worth experimenting with the exponential power of the pyramiding if you do drop the lot size.
There are lots of alerts in there (sorry Steve) about where trade send and order modify have come from and their parameters, also one at the end which shows your Margin ratio (*100 to get % :D ) Margin Ratio remained above 500%. (lowest was 538%)

All we need now is a method to trade the flat bits of the equity curve :)

Code: Select all

Symbol GBPUSD (Great Britain Pound vs US Dollar) 
Period 4 Hours (H4) 2011.03.21 00:00 - 2011.05.26 20:00 (2011.03.21 - 2011.05.27) 
Model Every tick (the most precise method based on all available least timeframes) 

Bars in test 1295 Ticks modelled 3213689 Modelling quality 90.00% 
Mismatched charts errors 0     
 
Initial deposit 10000.00     
Total net profit 6070.61 Gross profit 9851.80 Gross loss -3781.19 
Profit factor 2.61 Expected payoff 54.69   
Absolute drawdown 87.92 Maximal drawdown 3019.74 (18.24%) Relative drawdown 18.24% (3019.74) 
 
Total trades 111 Short positions (won %) 71 (23.94%) Long positions (won %) 40 (32.50%) 
 Profit trades (% of total) 30 (27.03%) Loss trades (% of total) 81 (72.97%) 
Largest profit trade 1951.61 loss trade -544.64 
Average profit trade 328.39 loss trade -46.68 
Maximum consecutive wins (profit in money) 8 (2366.90) consecutive losses (loss in money) 14 (-465.17) 
Maximal consecutive profit (count of wins) 3231.17 (3) consecutive loss (count of losses) -930.87 (6) 
Average consecutive wins 2 consecutive losses 6 

StrategyTester Joe2 initial.gif
Hehe. I have your version running on demo, and it is taking 0.32 lot trades not the 0.01 that I want. Is that you or me causing this?
Author:  DragosDanescu [ Tue Dec 13, 2011 10:22 pm ]
Post subject:  Re: Joe. Swing-trade your way to a baby equity millipede

SteveHopwood wrote: Hehe. I have your version running on demo, and it is taking 0.32 lot trades not the 0.01 that I want. Is that you or me causing this?
Nope, Steve, same here, for some reason, base lot is disabled. This is taking over, instead:

Code: Select all

  //Lot size calculated by risk
      Alert(SendLots);
      SendLots = SendLots*(2^(5-OpenTrades));//Andydoc      
      Alert(SendLots);
      if (RiskPercent > 0) SendLots = CalculateLotSize(NormalizeDouble(stop, Digits), price);
Author:  SteveHopwood [ Tue Dec 13, 2011 10:36 pm ]
Post subject:  Re: Joe. Swing-trade your way to a baby equity millipede

DragosDanescu wrote:
SteveHopwood wrote: Hehe. I have your version running on demo, and it is taking 0.32 lot trades not the 0.01 that I want. Is that you or me causing this?
Nope, Steve, same here, for some reason, base lot is disabled. This is taking over, instead:

Code: Select all

  //Lot size calculated by risk
      Alert(SendLots);
      SendLots = SendLots*(2^(5-OpenTrades));//Andydoc      
      Alert(SendLots);
      if (RiskPercent > 0) SendLots = CalculateLotSize(NormalizeDouble(stop, Digits), price);
Cheers. That is just LUC and a bit of forgetfulness kicking in. Coders can cancel the mahoosive lot calculation. I shall let it run, for fun. :lol:

:D
Author:  andydoc [ Tue Dec 13, 2011 10:46 pm ]
Post subject:  Re: Joe. Swing-trade your way to a baby equity millipede

Hi Steve. Sorry, this will be brief as it is on the iphone but it is the pyramiding of the stack i.e. Start with a high lot position and add to it in reducing sizes. The idea is that the majority of the position wont get taken out by retracements but rather by the later 50 % culls
If you rerun my backtest with and without it you will see the benefit
Author:  andydoc [ Tue Dec 13, 2011 10:50 pm ]
Post subject:  Re: Joe. Swing-trade your way to a baby equity millipede

Just for info if you do want to cancel it it also appears in HasSellFilled() and HasBuyFilled() in fact it is only those two that are effective as I have disabled the initial trade to get rid of the fakeouts
All times are UTC Page 10 of 15