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

Gravy Trains & Weather Vanes
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=5238
Page 11 of 17
Author:  RisklessPips [ Fri Sep 22, 2017 5:20 am ]
Post subject:  Gravy Trains & Weather Vanes

GTWV with ADX and HGI Bug report and fix.

Line 1493 - change OrderStopLoss() to OrderTakeProfit() - This bug prevents addition of TP.

Charles.
Author:  RisklessPips [ Fri Sep 22, 2017 8:45 am ]
Post subject:  Gravy Trains & Weather Vanes

Results GTWV on H4 - EOW 22nd Sept 2017


Results with AUDJPY
- Progress should not be measured trade by trade but rather over time. For this reason I continue to include this pair in results for comparison even though I no longer trade it.

Cumulative results :cheer: (i.e from start of open demo account to date - init balance 500 USD, 1:100)
End of last week - Expectancy per dollar traded = -3.8%, Expectancy per trade -0.15 (Dataset 410 trades)
End this week - Expectancy per dollar traded = -3.3%, Expectancy per trade -0.13 (Dataset 474 trades)

Weekly results :cheer:
Last week - Expectancy per dollar traded = +11.8%, Expectancy per trade +0.53 (Dataset 42 trades)
This week - Expectancy per dollar traded = +7.4%, Expectancy per trade +0.23 (Dataset 65 trades)

Progress Report :
Cumulative results - The cumulative expectancy figures improved marginally from -3.8% to -3.3% per dollar traded. We are still moving in the right direction. - Great. Room for improvement (but look at the results below without AUDJPY for comparison.)

Weekly results
The weekly results are still in positive territory for expectancy although down on last week from +11.8% to +7.4% per dollar traded. This was during a week when many changes went on with trade management and this may have contributed to the dip or maybe it was just the market conditions at play - different week, different results
GTWV also took a higher number of trades 65 up from 42 - but this is perhaps explained because the EA now takes trades at SL and TP !


Results without AUDJPY


Cumulative results 8-)
End of last week - Expectancy per dollar traded = +1.2%, Expectancy per trade +0.05 (Dataset 348 trades)
End this week - Expectancy per dollar traded = +1.2%, Expectancy per trade +0.05 (Dataset 412 trades)

Weekly results :cheer:
Last week - Expectancy per dollar traded = +15.4%, Expectancy per trade +0.68 (Dataset 41 trades)
This week - Expectancy per dollar traded = +7.4%, Expectancy per trade +0.23 (Dataset 65 trades)

Progress Report :

Cumulative results
Expectancy results are the same this week as last at +1.2% per dollar traded.

The win / loss ratio did not change much this week - I will keep trying to adjust it to 70/30.

Weekly results
The weekly results at +7.4% per dollar traded is explained by the comments above for weekly with AUDJPY. (These will be the same because I am no longer trading AUDJPY)

Notes - The new GTWV with ADX and HGI will hopefully improve trade management reaction to market and price conditions. This will inevitably feed back into the results over time.

Next week the plan is to take a long hard look at market scenarios and derive better trade management style variables for BE / SL / TP and trails. I will continue looking at raising the win / loss rate to near 70 / 30. I will decide over the weekend whether or not to ditch CHFJPY

Charles
Author:  RisklessPips [ Sat Sep 23, 2017 4:12 pm ]
Post subject:  Gravy Trains & Weather Vanes

Musings In Between Trading

I was reviewing the results GTWV is achieving and started thinking.

This is the trading position after 3 weeks.

I have been trading a 500 USD initial account at 1:100 leverage. Since the open of account some 3 weeks ago it has lost a maximum of 60 USD although in the last 2 weeks it has recovered some 20 USD to stand at about 460 USD.

This leaves an interesting set of questions.

There is no sugar coating it – GTWV is currently running "expectancy positive" and therefore should in time make money. But as things stand, in real terms of cold hard cash it is losing money.

Why?

I have come up with 5 possible reasons.

1) I am trading an account size that is insufficiently capitalised.
2) I am trading the wrong instruments
3) I am trading the wrong TF’s
4) Sub Optimal combinations of BE / TP / SL and trails to suit different market and price conditions
5) Something else

Trading With An Undercapitalized Account.

My risk tolerance per trade is a maximum of 2% (and often less than that) of initial account size. I am prepared and OK taking a 10 USD loss per trade. I would have to lose 50 straight without reply to wipe out my account. Is this possible ? Perhaps, but unlikely - so it will take a fair number of trades at this risk level to wipe me out !

10 USD as a ceiling for my losses is represented by 100 pips on most of the pairs I am currently trading.

Many major pairs will move near or over 100 pips per day depending on TF traded !

If this is my problem, then the question can be reframed thus. Am I playing the game without sufficient funds to cover my risk appetite ?

Aside : Lee Trevino was a professional golfer. The Texan once said when he started to play for money he would play in betting games without a dime in his pocket. He therefore had no option but to win ! This worked because

a) He was a brilliant golfer (Skilled)
b) He was playing a known and knowable opponent (Predictable environment)
c) He had immense confidence having done this several times in the past (Self belief from experience)

Unfortunately, this model does not work in trading.

GTWV is a highly mechanical strategy with little required by way of interpretation. It is also simple enough most people can master its operation within a short time. In GTWV skill is therefore not a problem.

However, the markets we are trading are anything but predictable. I will not go into this again here but for my take on this aspect of markets read this thread from the beginning.

I may have self belief, but if my results are contrary to what I want that belief can be eroded. This is a potential issue. To trade as though it does not exist is to have a blind spot that may be affecting my results.

If the answer to the reframed question is yes I am playing a game that is too rich for my available stake then as a realist I know what to do. Save up and open an account with more money. How much more ? That will be a follow up question.

If I am playing with a capital base that works, then we need to look at the other questions above.

Trading Wrong Instruments.

I opened the account and decided without much thought to trade the majors.

Why ?


I used the reasoning that these pairs are highly liquid and I would never have a problem getting trades filled.

But on reflection, at 0.01 lots per trade who cares about liquidity ? On entry If the market cannot buy or sell my 0.01 lots I am probably better out of the market. If I am liquidating a position this is more of a problem but one I am aware of of and therefore it wont come as a surprise. I will deal with it !

I have now reviewed the daily and hourly range movements of a large number of instruments.

It is clear the majors will eat up my 100 pip ceiling loss on most days and at TF’s above H4.

EURUSD is the most liquid pair. It also moves up and down beyond my ceiling risk pips frequently. When I trade this pair I am not putting the odds in my favour, I am lengthening them !

USDHKD a little mentioned pair has a range of movement that is comfortably covered most days and hours by my ceiling risk tolerance.

Knowing this – which pair do you think I should trade ?

I have now come up with the following pairs for trading as of next week because they move within a range my risk tolerance can handle given my initial account size.

AUDUSD
EURCHF
HKDJPY
SGDJPY
USDHKD
USDSGD

The spreads are higher at about 2 or 3 pips (although on my broker the commissions are actually lower !) These are also admittedly less liquid than the majors but I will be watching for problems in these areas.

Trading Wrong Time Frames.

The longer TF’s have a higher range of movement in terms of pips per candle. Price can make innumerable patterns of movement during each candle. These patterns can whipsaw and deplete a small 500 USD account in short order !

This is why my tests trading weekly charts failed !

The pips movement on my initial instruments meant I could not adequately cover my positions with my ceiling risk of 2%. I was playing a game I could not afford.

At D1 the pips range is at the limit of my risk ceiling and therefore GTWV treads water at best. I want to make money not tread water so again this logic seems to rule out trading day charts.

H4 is the first TF where 100 pips risk covers the range of movement adequately. My initial set of pairs had an average of ATR in the low to mid 30’s at H4. My new set has lowered that to under 30.

At this range of movement the pair can move 3 times its "normal" range before hitting my SL and therefore I am not tailgating price.

On TF’s below H4 the movement is within my risk ceiling but the movement is also much more erratic and that has an equally negative effect on results.

Therefore for a 500 USD account – I am settling on trading H4.


Sub Optimal Combination Of Trade Management Settings

Effective and efficient trade management is a moving target and at times my combination of BE / SL / TP / Trails will be spot on and at other times it will be off.

This is why we are now running GTWV with ADX and HGI to sharpen the management tool for this task.

A test I am implementing from next week will have two different accounts running the same new pairs with one running HGI signals and the other running ADX. Perhaps I should also have a third running default settings as a control account – something to think about.

Something Else

By deduction, if none of the reasons above are responsible for my dollar loss of equity it must be due to something else.

For instance

Challenge : GTWV does not work as a strategy or as incarnated
Solution: Go back to the drawing board.

Challenge: I am applying the strategy incorrectly
Solution: Review the strategy, ask more questions and apply the lessons

These are difficult questions to face but to ignore them is to blind myself – only by dealing with each in turn will I find answers.

Charles

Ps That something else could also just be a simple "give it time" :smile:
Author:  lwtrade [ Sat Sep 23, 2017 7:36 pm ]
Post subject:  Gravy Trains & Weather Vanes

Love your last post. Especially your reasonings on instruments... great food for thought!

I might put the 2 versions on a pair of demos this week also and see how they go. Will you just be turning HGI on vs ATR. Any other settings to change? Would it be worth leaving these on the majors to see how they compare to your pair sets maybe?
Author:  lwtrade [ Sat Sep 23, 2017 7:53 pm ]
Post subject:  Gravy Trains & Weather Vanes

Kind of relates but I coded an idea that I was able to backtest using the chart (not the inbuilt backtester). I ran 1000 bars (60min chart = ~42 days) and this image was the result... With a bit of tweaking this could be something, I thought...
2017-09-24 08_15_54-Greenshot.png
Pretty good. Maybe I might just test a few thousand bars just to see....
2017-09-24 08_12_47-Greenshot.png
Just shows how random these things can be and how something can be working for a while but it is actually only part of some random walk!

That is why I like this GTWV strategy idea because it takes what price is doing NOW, rather than trying to guess what it is going to do.

LW
Author:  RisklessPips [ Sun Sep 24, 2017 4:44 am ]
Post subject:  Gravy Trains & Weather Vanes

lwtrade » Sat Sep 23, 2017 9:36 pm wrote:Love your last post. Especially your reasonings on instruments... great food for thought!

I might put the 2 versions on a pair of demos this week also and see how they go. Will you just be turning HGI on vs ATR. Any other settings to change? Would it be worth leaving these on the majors to see how they compare to your pair sets maybe?
Morning LW. I'm using same settings different signals. May be a long test because i cannot accurately assess results from a weeks worth of trades.

I'm also expecting reduced trade opens because the new instruments move less on average than my majors

Charles
Author:  RisklessPips [ Mon Sep 25, 2017 8:44 am ]
Post subject:  Gravy Trains & Weather Vanes

Bug Report and Fix - In Add A Missing Take Profit Processing

There is some important code I omitted accidentally in the Insert A Missing Take Profit Function.

Find line 1550 and look for a comment that shows the end of the bool UseHGI thus // if (UseHGI)

add the code attached below that line

Code: Select all

 if (UseADX) // If ADX signals chosen as service alone
      {
    
      if (adx >30) // In a Trend - In between 20 and 30 use the default settings
      {
        MissingTakeProfit = TREND_MissingTakeProfitPipsADX;
        AtrVal = iATR(OrderSymbol(), TREND_AtrTpTimeFrame, TREND_AtrTpTimeFrameADX, 0) * TREND_AtrTpMultiplierADX;
     } //  if (adx >30) // In a Trend - In between 20 and 30 use the default settings
       
       if (adx < 20) // In a range - In between 20 and 30 use the default settings
    {
        MissingTakeProfit = RANGE_MissingTakeProfitPipsADX;
        AtrVal = iATR(OrderSymbol(), RANGE_AtrTpTimeFrameADX, RANGE_AtrTpPeriodADX, 0) * RANGE_AtrTpMultiplierADX;
    } //  if (adx < 20) // In a range - In between 20 and 30 use the default settings
  } //     if (UseADX)
You will notice I am now using a value of 30 to confirm ADX is telling me there is a trend - please keep it this way for now - when I release the bug free :smile: version later this week it will all be consistent.


Joined Up Risk Reward Thinking


On another note I am also refining the trade management process of the EA to allow you to just set a SL and then to have the TP and BE calculated on the basis of that SL with reference to parameters you can set.

The reasoning is there needs to be "joined up" thinking behind the SL and TP (Think Risk Reward) - Currently you are able to set a SL and then a TP that has little in connection with that SL. This amendment will rectify that.

Similarly BE is at one level of thinking taking profits off the table early i.e ahead of time. I am therefore making it possible to lock in profits at a percentage of TP which can be quite close to TP.

This will remove the "fear" factor that makes you want to protect profits with BE and by doing that achieving the very opposite by strangling price :arrrg:

This change will give price room to move without tailgating it whilst I hope respecting the maxim "Never let a winner become a loser" :clap:

I am not sure if these changes are of interest to many so I will release GTWV Trade Manager with ADX and HGI and then if people want the joined up Risk Reward changes I will look at releasing those at a later date.

Charles
Author:  RisklessPips [ Wed Sep 27, 2017 10:12 am ]
Post subject:  Gravy Trains & Weather Vanes

GTWV with ADX HGI and RR - Code Update

At the risk of making some of you code download fatigued :( I am posting GTWV again.

This trade manager is now quite sophisticated

Apart from the 6 management styles already described in an earlier post, it now has a user controlled ability to add TP and manage BE stops with reference to SL so that Risk Reward (RR) becomes "slightly” easier to manage.

Having set your risk (SL), you can now apply TP and BE without having to recalculate their values as in "normal" processing.

Two key things have emerged during my testing :

1)There is a large number of combinations that can be applied for SL / TP / BE and trails based on any of the chosen management styles.

2) I have also tried to make the code "idiot" proof so that if contradictory settings are accidentally (or otherwise) selected a logical outcome will still result. - This is an area where your testing will greatly help to improve this versatile, flexible trade manager if you spot outcomes that cannot be explained based on your settings.

For these 2 reasons the testing is involved and time consuming. However, there are significant benefits to this release.

Benefits
1) The earlier posted code (which is now deleted) had several processing logic issues that only came to light with detailed testing. This code rectifies those errors (although in so doing it may have introduced others ho hum :)

2) This code now also includes processing, controllable by a switch to define Risk Reward (RR) settings. These are additional and complimentary to the existing ADX and HGI signal services.

3) I had earlier intended to keep the RR processing separate but, with the user switch, if you do not want it to kick in just leave it at false and the Default / ADX / HGI management styles processing will occur as currently happens.

Notes
1) The setfile is well documented - but if you have any questions please ask them here - they may help someone else

2) The RR processing is now switched on and off and settings applied at the bottom of the setfile. The settings are as follows :

a) Given your SL settings, decide what multiplier you wish to apply for the TP and set it respectively for Default / ADX and HGI management styles
b) Determine what percentage of TP you want BE to occur and set it respectively for Default / ADX and HGI management styles
c) Determine when BE is achieved how much profit IN PIPS is to be locked in. Set this respectively for Default / ADX and HGI management styles

3) If ADX and HGI are both switched on – ADX will take precedence.

4) If ADX and HGI are both switched off – Default management style will prevail

5) If RR processing is switched on:

a) Adding a missing TP will take its value as a multiple of SL from the RR settings regardless of other settings.
b) BE will take its value as a percentage of TP from the RR settings regardless of other settings
c) SL settings are not affected by RR settings
d) Trails are not affected by RR settings.

6) The addition of new trades at BE / SL and TP is controlled by a switch for each type of new trade. Settings are controlled at management style level.

There is a known as yet unsolved open new trade at SL / TP problem due to how the code determines a trade has closed at those stops. This issue manifests occasionally and means that new trades at SL / TP will open 70% - 80% of the time after the stop has been hit.

7) Where the applicable SL ATR is set on, the EA will apply a SL that is closer to entry price between the calculated ATR value and the missing stop loss pips.

8) Where the applicable TP ATR is set on, the EA will apply a TP that is further from entry price between the calculated ATR value and the missing take profit pips.

Trouble Shooting
Stop Loss
SL not being set
Ensure allow missing SL is set on at the very least in the Default management style.
Ensure Missing Stop loss pips is not 0 at the very least in the Default management style.
Ensure no trails (trailing before BE) are set at a level that causes the SL to move from where it is added
Ensure BE is not set at a level that causes the SL to move from where it is added before your intended level.

Take Profit
TP not being set
Ensure allow missing TP is set on at the very least in the Default management style.
Ensure Missing Take Profit pips is not 0 and / or ATR TP is switched on at the very least in the Default management style.
If RR is switched on check the multiplier of SL that determines TP in the management styles is not 0

BE not processing
Ensure the BE processing is set to true in the management styles.
If RR is switched on ensure the BE is not 100% or more of the TP !

Trails not processing
Ensure the required trail (Jump or standard) is switched on for the different management styles.
Ensure the trail is not such a high number of pips that it is not being triggered (before or after BE)

New trades not opening
If new trades at BE are required, switch this option on.
If new trades are required at SL or TP – switch these options on.
For trades at SL / TP see the notes above.

HGI signals not working
Ensure you have hgi_lib.mqh in your includes directory. Available from the main HGI Forum.

Enjoy

EDIT - Code updated and posted as V2.0 on page 6 - 02/10/17

Charles
Author:  rapple [ Thu Sep 28, 2017 4:55 am ]
Post subject:  Gravy Trains & Weather Vanes

Dear Charles

Thanks for all the time and effort you have put into these EAs and the educational content

I am placing manual trades and using 'Gravy Trade Manager' to handle.

Can you tell if the 'Gravy Trade Manager' EA posted on Page 6 also needs the amendments you made to the code of 'GTWV Trade Manager ADX HGI & RR' or should I move to the new EA and disable ADX, HGI and RR?

Thanks Richard
Author:  RisklessPips [ Thu Sep 28, 2017 5:20 am ]
Post subject:  Gravy Trains & Weather Vanes

rapple » Thu Sep 28, 2017 6:55 am wrote:Dear Charles

Thanks for all the time and effort you have put into these EAs and the educational content

I am placing manual trades and using 'Gravy Trade Manager' to handle.

Can you tell if the 'Gravy Trade Manager' EA posted on Page 6 also needs the amendments you made to the code of 'GTWV Trade Manager ADX HGI & RR' or should I move to the new EA and disable ADX, HGI and RR?

Thanks Richard
Hi Richard

I would remove the old EA as I cannot guarantee the logic and replace with GTWV with ADX HGI and RR.

Set all switches for open new trades i.e at BE / SL and TP to false so you can add your manual trades. (BTW what criteria do you use for these ?)

If you want ONLY default trade management (why would you want ONLY that :smile: ) then make sure use HGI / ADX and RR are also switched to false.

In my next post below I will post my setfile for the new version.

Charles
All times are UTC Page 11 of 17