Rail Road Tracks

Post Reply
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Rail Road Tracks

Post by SteveHopwood »

SERIOUS WARNING
  • Most Forex traders lose all their money.
  • Using the robot posted here in trading Forex does not guarantee success.
  • Trading this robot could lead to serious financial loss.
  • Trading this robot without understanding its underlying trading strategies guarantees traders will lose their money.
  • This is not a set-and-forget ea; there is no such thing and anyone who tries to claim there is, is either stupid or lying. This ea requires frequent manual intervention.
  • At best, a trading robot is only 90% as good as the manual strategy it trades. At best. At worst, it can be much less effective. If the strategy is rubbish, so is the robot.
  • To trade this robot, you have to understand:
    • How to use EA's. Remember to set IsGlobalPrimeOrECNCriminal to 'true' if your crim insists on two-stage order sending.
    • The candlestick pattern known as Rail Road Tracks.
I am not yet trading this EA on my live account

CJ has introduced a number of us to the candlestick pattern known as RailRoad Tracks, in his thread at http://www.stevehopwoodforex.com/phpBB3 ... =59&t=1572. If you have not read his thread yet, then forget this EA, take a day out of your life to read CJ's thread, and learn some wonderful trading secrets.

My understanding of a rrt is this, taking a high as an example:
  • It is a 2 candle pattern.
  • The first candle closes at, or very near, its high.
  • The second candle retraces a reasonable distance downwards
This is a strong reverse signal. In the following pic, I have marked 'picture perfect' rrt's in blue:
rrt illustration.gif
This ea is only concerned with 'picture perfect' rrt's. It will only detect the first candle in the rrt when it closes exactly at the high or low. This will cause a lot of trades to be missed when there is a tiny wick that a manual trader would ignore. Dealing with these is for the future.

RRT is a stop and reverse ea. Once in a trade, it will not close the trade until there is an opposite direction signal. This process can be interrupted in a variety of different ways: setting sl and/or tp; using trading hours; using the trade direction inputs etc Play around and see if any combination of these suits you.

Trading manually, we look at a chart, look at a candle and decide for ourselves whether it is the start of a potential rrt. An ea cannot do this, and so needs a set of guidelines. These are the 'Trading time frame and candle inputs' inputs:
  • TradingTimeFrame: this is the time frame you wish the ea to trade.
    • A zero value means 'the current chart' so changing time frames on your chart will bugger up the ea.
    • Set this value to one of the usual chart time frames (1, 5, 15, 30, 60, 240, 1440 etc) and RRT will continue to trade your chosen chart even though you change chart time frames.
  • MinCandlesInSequence: The trigger candle must have the highest high (sell) or lowest low (buy) of this number of candles. This is an attempt to ensure trading a swing.
From here, it is necessary to tell RTT which candles are long enough to be considered part of a rail road track, so there are some inputs to facilitate this:
  • AverageCandleLength: this allows you to input the average length of a candle. There is a script attached that will calculate this. Or, you can set this input to 0 and RRT will calculate this for you:
    • CandlesToCount: the number of candles to use when calculating the average length of a candle. This will only be used if AverageCandleLength = 0.
  • MinimumFirstCandlePercentage: when the previous candle closed at its hi/lo, it must be at least this percentage of the average candle length to qualify as the first candle in a possible rrt.
  • AllowableWick1Percent: I highlighted 'picture perfect' examples, but look at any chart and you will see umpteen examples of rrt's where the first candle had a small wick. This input tells RRT how large a percentage of the candle the wick can be before it becomes too long.
  • MinimumSecondCandlePercentage: this is the distance the second candle must retrace of the first, to trigger stop and reverse. i.e. given the default:
    • the previous candle closed at its high. It is 20 pips in length.
    • the current candle has to retrace 10 pips to trigger an existing buy close and a fresh sell.
So, this ea is a 2 candle trader. It looks at the previous candle. If it qualifies as the first in a possible rrt, then it will trigger stop and reverse when the market passes the required point of the first candle.


Rail Road Tracks 'n Pin
CJ also introduced us to the concept of the market maker 'stop hunting'. Please visit CJ's thread to find out about this. A sign that there has been a stop hunt is a pin bar. This is a candle with a short body and much longer wic. I have highlighted a few in this picture:
pin bar illustration.giff.png
You can see how often a pin bar comes before a reverse. RRTP adds pin bar trading to all of the above. There are inputs that allow you to turn off rrt or pin bar trading.
  • RequiredWick2Percentage. This is the percentage of the candle that the wick must occupy to allow a stop and reverse trade. lucklogic had the great idea of awarding the candle pin bar status only if it is > the average candle length, so I adopted this.
  • pinbarPercentageOfLength: Pin bar must be >= this multiple of the average candle size.
  • PinBarShift in the 'Pin bar inputs' section.
    • If you leave this at its default of 0, RRTnP will continue to examine the current candle to see if it is forming a pin bar.
    • setting it to 1 will force RRTnP to look at the previous candle and only trade a pin bar if really was a pin bar.
  • HtfPinBar, in the 'Trading time frame and candle inputs' section. I had this idea this morning after reading that a lot of the guys in CJ's thread start out by looking for a currently-forming pin bar on the D1, then dropping down time frames to look for RRT's, pin bars, W and M formations:
    • setting this input to zero turns the filter off.
    • if set to > 0, RRTnP will only look for rrt's and pin bars if the D1 candle is currently forming a pin bar.

Average spread
We do not want RRTnP trading during a stop hunt, so there is code to calculate the average spread and store it for retrieval every time you restart the bot.

The first time you run the ea it will take time to calculate the average spread. The screen will display a message telling you how far into the process it is.
  • RunInSpreadDetectionMode: run RRTnP with this set to 'true' occasionally to make sure the average spread is up to date. The easiest way to force a recalculation is to delete the Global Variable that stores the average. Perform this when you know there are no major news events coming up.
    • Press the F3 key to open the Global Variables window.
    • Rhe relevant GV's begin with the chart symbol then " average spread" e.g. "EURUSD average spread". Highlight the GV and delete it. Close down and restart your platform and RRTnP will detect the need for a recount.
  • TicksToCount: the number of ticks to use as the averaging period.
  • MultiplierToDetectStopHunt: this multiplies the average spread and pauses the bot if the spread exceeds this.
Trade exit
  • Take profittrades:
    • TakeProfitPips: allows you to set a 'hard' and unvarying take profit.
    • UseFractals: tells RRTnP to use the most recent Fractal to set a tp. Find out how to use the Fractals indi before enabling this.
  • Stop loss:
    • StopLossPips: allows you to set a 'hard' and unvarying stop.
    • UseHiLo: this tells RRTnP to set a stop loss at the high (sell) of low (buy) of the trigger candle.
    • AddToAutoStopLossPips: adds/subtracts this number of pips to/from the high or low of the trigger candle when calculating the stop loss.
Risk versus reward
Two inputs allow you to tell the bot to calculate the lot size on the basis of risk versus reward:
  • RiskPercent (just underneath the Lot input: if > 0, RRTnP will calculate a lot size based on the stop loss. The lot size will be that which will take out RiskPercent of your account should the stop loss be hit. You cannot use this feature if trading without a stop loss, so do not try.
  • MinimumRiskReward tells the bot to cancel the trade if the risk versus reward falls below this threshold. For example, given the default: a tp of 20 pips but sl of 15 would cancel the trade; a tp of 20 and sl of 10 would allow the trade
10.4 Moving Average trend detection
RRTnP includes Bob's 10.4 trend detection. MaPeriod = 0 turns this filter off - the default. Turn it on only if you know what you are doing and understand 10.4

Conclusion
Lots to explore here. Let's see if this puppy has a decent waggy tail.

:D

Shell user guide
This describes the usual inputs in my EA's. Consult it for details not listed above.


Matters of general interest
Go here to download and run the script that will fill your platform's missing chart history: http://www.stevehopwoodforex.com/phpBB3 ... f=15&t=254
Read this post:
http://www.stevehopwoodforex.com/phpBB3 ... p?f=6&t=78 Newbie traders, read this for inspiration and warning. Those of you who have suffered losses, read it for inspiration.

Masterly summary of hedging: http://www.forexfactory.com/showthread. ... ost4977179

EA coding
I receive may requests to code EA's. Traders, if I code your EA for free, then I will share it here. If you want me to code your EA without sharing, then my fee is $100 payable into my paypal account. I explain why at http://www.stevehopwoodforex.com/phpBB3 ... ?f=15&t=79, at the bottom of the post.

Useful utilities/EA's/scripts
You do not have the required permissions to view the files attached to this post.
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Rail Road Tracks

Post by SteveHopwood »

The basics appear to be correct. I left RRT running on an M1 chart and it has been sari'ing to ite hearts content.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
FreddyFX
Trader
Posts: 28
Joined: Sun Dec 04, 2011 6:51 pm
Location: Puerto Vallarta - Mexico

Re: Rail Road Tracks

Post by FreddyFX »

NOW you start playing my music, piano man, hahahahaha
Trading forex is easy, making money is simple.
It is the mental part that is difficult.
User avatar
Reaper
Trader
Posts: 476
Joined: Sat Feb 09, 2013 12:07 am
Location: UK

Re: Rail Road Tracks

Post by Reaper »

Thank you for this! Is there anyway to make this into an indicator only as well?
.
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Rail Road Tracks

Post by SteveHopwood »

Angat wrote:Thank you for this! Is there anyway to make this into an indicator only as well?
SendAlertNotTrade

Do not expect other answers from me about the usual inputs. There is lots of info available to explain them elsewhere.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
alex_forex
Trader
Posts: 438
Joined: Tue Nov 15, 2011 5:46 pm
Location: F R A N C E

Re: Rail Road Tracks

Post by alex_forex »

This is crazy Steve.
I must leave, I have a train to catch, see you later.

Alex
User avatar
cheva282
Posts: 9
Joined: Thu Feb 14, 2013 5:33 am

Re: Rail Road Tracks

Post by cheva282 »

Hello, is the EA good to trade LIVE?

did you do any backtests?
Simplicity is the ultimate sophistication - Leonardo Da Vinci
hannele
Trader
Posts: 137
Joined: Wed Sep 19, 2012 2:31 am

Re: Rail Road Tracks

Post by hannele »

Thanks Steve :-)

Cheers,
hannele
User avatar
Aussiedoc
Trader
Posts: 270
Joined: Tue Dec 13, 2011 8:10 am
Location: Western District. Victoria. Australia

Re: Rail Road Tracks

Post by Aussiedoc »

Thanks Steve
Cheers
If you can never exceed your own expectations - why expect second-best?
User avatar
mobthehop
Trader
Posts: 362
Joined: Wed Nov 16, 2011 12:16 am

Re: Rail Road Tracks

Post by mobthehop »

cheva282 wrote:Hello, is the EA good to trade LIVE?

did you do any backtests?
First post and two questions better avoided here.... wow what a start....
Post Reply

Return to “Automated trading systems”