I love this thread over on FF by Pipeasy.
http://www.forexfactory.com/showthread.php?t=245149
The reason for this post is that I'm seriously thinking of trying to code an EA which builds millipedes.
The question is, does it work?
Does anybody here trade like this?
Is an EA even plausible for this method?
To summarise the methodology(I don't think you can call it a system), it involves:
In short timeframe(intra day)
Looking for low risk reversal points and keeping a very tight stop.
aggressivley stacking positions when an entry moves for you.
taking partial profits(pipeasy called this diversification) from successful stacks when momentum dies off in order
to maintain account balance.
setting SL to Breakeven and keeping the remaining open positions for.....
In the medium term(daily)
Allow open positions to grow or die at breakeven.
Surviving trades will appear to have been opened very close to the beginning of new trends.
Further diversify successful stacks when daily momentum dies off in order to maintain account balance and.....
In the longer term(Weekly/Monthly)
Any surviving trades are no longer managed except for occasion review of very long term trend.
The aim is to build a series of long term "Forever" trades in both directions at the beginning of all the major trends both up and down.
as a starter for 10, it seems to me that there are 3 key things to get right in the EA:
1) The low risk initial entries.
2) making the maximum out of stacking opportunities.
3) Diversifying appropriately.
The toughest to code and least mechanical of these is the initial entries. Given that in the thread, entries are almost exclusively PA based, It will be almost impossible for a rule based EA to get quite the success rate a human could, but I do think that a profitable EA is possible, just not as good as an expert human.
The advantage the EA has is that when a big move comes, it will be able to trade many pairs and simultaneous stacks which would overwhelm a human trader.
The thread mentions a number of posible entry methods:
Long tails
Momentum breakouts
Flying bhudda's
etc..
on top of that there are various methods possible from the naked trading thread. Has anyone tried yet to code any of these?
Your thoughts are welcome...
Building an Equity millipede:- Long Term Position Trading
-
dietcoke
- Trader
- Posts: 162
- Joined: Tue Nov 15, 2011 9:59 pm
- matt_32
- Trader
- Posts: 204
- Joined: Tue Apr 03, 2012 8:51 am
- Location: Crete, Greece
Re: Building an Equity millipede:- Long Term Position Tradin
dietcoke wrote:I love this thread over on FF by Pipeasy.
http://www.forexfactory.com/showthread.php?t=245149
The reason for this post is that I'm seriously thinking of trying to code an EA which builds millipedes.
The question is, does it work?
Does anybody here trade like this?
Is an EA even plausible for this method?
To summarise the methodology(I don't think you can call it a system), it involves:
In short timeframe(intra day)
Looking for low risk reversal points and keeping a very tight stop.
aggressivley stacking positions when an entry moves for you.
taking partial profits(pipeasy called this diversification) from successful stacks when momentum dies off in order
to maintain account balance.
setting SL to Breakeven and keeping the remaining open positions for.....
In the medium term(daily)
Allow open positions to grow or die at breakeven.
Surviving trades will appear to have been opened very close to the beginning of new trends.
Further diversify successful stacks when daily momentum dies off in order to maintain account balance and.....
In the longer term(Weekly/Monthly)
Any surviving trades are no longer managed except for occasion review of very long term trend.
The aim is to build a series of long term "Forever" trades in both directions at the beginning of all the major trends both up and down.
as a starter for 10, it seems to me that there are 3 key things to get right in the EA:
1) The low risk initial entries.
2) making the maximum out of stacking opportunities.
3) Diversifying appropriately.
The toughest to code and least mechanical of these is the initial entries. Given that in the thread, entries are almost exclusively PA based, It will be almost impossible for a rule based EA to get quite the success rate a human could, but I do think that a profitable EA is possible, just not as good as an expert human.
The advantage the EA has is that when a big move comes, it will be able to trade many pairs and simultaneous stacks which would overwhelm a human trader.
The thread mentions a number of posible entry methods:
Long tails
Momentum breakouts
Flying bhudda's
etc..
on top of that there are various methods possible from the naked trading thread. Has anyone tried yet to code any of these?
Your thoughts are welcome...
Started reading the thread at FF. Exciting stuff.
Matt
"Wise men speak because they have something to say; Fools because they have to say something." - Plato 347 BC
-
Radar
- Trader
- Posts: 437
- Joined: Fri Mar 23, 2012 5:39 pm
- Location: Round the bend ;)
Re: Building an Equity millipede:- Long Term Position Tradin
Hey DietCoke,
I'm currently coding and testing something similar now... It's a manual entry scale-in manager, that only risks locked-in profit - rather than equity - on the scale-in trades. I got the idea from the same thread, but have adapted it so that there's less manual monitoring and intervention.
You pull the trigger on the first trade, and as your sl is moved further into profit, the EA determines whether to scale-in or not.
It only does part of what you're looking to do, but it's only the first stage of an idea that I've had for around 18 months.
Until a few weeks ago, I had no idea how to code anything, and could barely do minor CPE coding on indicators, so this has been quite a rewarding challenge
I'll post it in a couple of days
Have fun!
Radar =8^)
I'm currently coding and testing something similar now... It's a manual entry scale-in manager, that only risks locked-in profit - rather than equity - on the scale-in trades. I got the idea from the same thread, but have adapted it so that there's less manual monitoring and intervention.
You pull the trigger on the first trade, and as your sl is moved further into profit, the EA determines whether to scale-in or not.
It only does part of what you're looking to do, but it's only the first stage of an idea that I've had for around 18 months.
Until a few weeks ago, I had no idea how to code anything, and could barely do minor CPE coding on indicators, so this has been quite a rewarding challenge
I'll post it in a couple of days
Have fun!
Radar =8^)
Check out my new, (well, old now), manual trade & automatic scale-in manager,
StackManV2
StackManV2
-
dietcoke
- Trader
- Posts: 162
- Joined: Tue Nov 15, 2011 9:59 pm
Re: Building an Equity millipede:- Long Term Position Tradin
matt_32 wrote: Started reading the thread at FF. Exciting stuff.
Matt
Thanks guys.Radar wrote:Hey DietCoke,
I'm currently coding and testing something similar now... It's a manual entry scale-in manager, that only risks locked-in profit - rather than equity - on the scale-in trades. I got the idea from the same thread, but have adapted it so that there's less manual monitoring and intervention.
You pull the trigger on the first trade, and as your sl is moved further into profit, the EA determines whether to scale-in or not.
It only does part of what you're looking to do, but it's only the first stage of an idea that I've had for around 18 months.
Until a few weeks ago, I had no idea how to code anything, and could barely do minor CPE coding on indicators, so this has been quite a rewarding challenge
I'll post it in a couple of days
Have fun!
Radar =8^)
I've drawn some of the possibilties of this method
You do not have the required permissions to view the files attached to this post.
-
dietcoke
- Trader
- Posts: 162
- Joined: Tue Nov 15, 2011 9:59 pm
Re: Building an Equity millipede:- Long Term Position Tradin
OK, to get the ball rolling. I'm attacking the particption bit first. In other words look for low risk entries,
here is an EA which basically does nothing but look for potential turning points and then opens speculative positions with tight stop loss.
THIS EA WILL LOSE MONEY IF LEFT ALONE BECAUSE IT DOES NOT TAKE ANY PROFITS. IT IS CURRENTLY JUST AN EXERCISE IN ENTERING TRADES AT LOW RISK.
This EA looks for railroad track type entries and attempts to get in on the shadow of an exhaustion move.
Here are my rules for buys:
we looking for Price action like this.
I'm using a single indicator, which is a slightly modified Adaptive Laguerre Filter(ALF), which I use as a kind of instant trend line.
These are the rules to open a buy trade.
1) There are no existing trades in the same direction which have not had a stop loss set. So basically, one active trade at a time.
2) The first bar is at least a 10 period low (something to reverse)
3) The current price is still below the ALF(insta trend line)
4) The 1st candle's lower shadow is at least 15% of the it's length.
If all those criteria are met:
5) the entry point is set at the mid point of the 1st candle's lower shadow ( see yellow line on attachment)
If the criteria are not met for the last closed candle, the EA looks back to the previous candle and applies the same criteria and so on to a maximum of ten candles back.
Here is an example where the anchor is a bit further back. A buy will open when price hits that yellow line.
The criteria for sells is the reverse of buys.
In terms of trade management,
1) trades are opened without a SL
2) open trades are managed to either close or breakeven depending on their current profit over time using a number of pipfactors which are all represented as a proportion of the average daily range.
3) Open trades are managed actively until:
a) Their profit exceeds the BrkEvenPipsFactor(this is a fraction of the daily range in the setting converted to a $ value).
Action: Set Breakeven
b) The loss exceeds the StopLossPipsFactor converted to $. (this is used as an emergency stop)
Action: Close
c) The trade has been open longer than PeriodsBeforeSetBE periods and the profit is greater than BufferPipsFactor in $
Action: Set Breakeven
d) The trade has been open longer than PeriodsBeforeClose periods and the profit is less than 0
Action: Close
e) The last bar closes below the low of the activating bar
Action: Close
To install the EA. simply unzip millipede.zip into your Empty4 folder and restart terminal. The EA compiles with a number of Yellow warnings. Do not worry about these, they are unimportant.
The trading timeframe is set by MasterTimeframe. The default is H1. I've not tried it on a lower TF but it should work in the same way.
Which pairs are traded is determned by the true/false settings below
TradeAUDPairs
TradeCADPairs
TradeCHFPairs
TradeEURPairs
TradeGBPPairs
TradeJPYPairs
TradeNZDPairs
TradeUSDPairs
As posted, the bot only trades EURJPY, EURUSD, USDJPY. You can change that by setting other currencies to true. However, if you trade all pairs there is a lot of activity so maybe tone it down until you can see what is going on.
There is a trading hours setting which I have configured for my broker time. The idea is to not open trades from the last hour of US session to the beginning of the Asian session so you may need to modify this setting to your own Broker.
I've had this on demo since the beginning of the month and what I have found is that of the closed trades, about 50% close at breakeven or a tiny profit.
another 40% close with a small loss and 10% close at my emergency stop set at 0.5 of a daily range. and the bot has lost about 5%.
However, for much of the time it has been running with a comfortable open profit which suggests to me that with stacking introduced to the mix, there could be something in this.
here is an EA which basically does nothing but look for potential turning points and then opens speculative positions with tight stop loss.
THIS EA WILL LOSE MONEY IF LEFT ALONE BECAUSE IT DOES NOT TAKE ANY PROFITS. IT IS CURRENTLY JUST AN EXERCISE IN ENTERING TRADES AT LOW RISK.
This EA looks for railroad track type entries and attempts to get in on the shadow of an exhaustion move.
Here are my rules for buys:
we looking for Price action like this.
I'm using a single indicator, which is a slightly modified Adaptive Laguerre Filter(ALF), which I use as a kind of instant trend line.
These are the rules to open a buy trade.
1) There are no existing trades in the same direction which have not had a stop loss set. So basically, one active trade at a time.
2) The first bar is at least a 10 period low (something to reverse)
3) The current price is still below the ALF(insta trend line)
4) The 1st candle's lower shadow is at least 15% of the it's length.
If all those criteria are met:
5) the entry point is set at the mid point of the 1st candle's lower shadow ( see yellow line on attachment)
If the criteria are not met for the last closed candle, the EA looks back to the previous candle and applies the same criteria and so on to a maximum of ten candles back.
Here is an example where the anchor is a bit further back. A buy will open when price hits that yellow line.
The criteria for sells is the reverse of buys.
In terms of trade management,
1) trades are opened without a SL
2) open trades are managed to either close or breakeven depending on their current profit over time using a number of pipfactors which are all represented as a proportion of the average daily range.
3) Open trades are managed actively until:
a) Their profit exceeds the BrkEvenPipsFactor(this is a fraction of the daily range in the setting converted to a $ value).
Action: Set Breakeven
b) The loss exceeds the StopLossPipsFactor converted to $. (this is used as an emergency stop)
Action: Close
c) The trade has been open longer than PeriodsBeforeSetBE periods and the profit is greater than BufferPipsFactor in $
Action: Set Breakeven
d) The trade has been open longer than PeriodsBeforeClose periods and the profit is less than 0
Action: Close
e) The last bar closes below the low of the activating bar
Action: Close
To install the EA. simply unzip millipede.zip into your Empty4 folder and restart terminal. The EA compiles with a number of Yellow warnings. Do not worry about these, they are unimportant.
The trading timeframe is set by MasterTimeframe. The default is H1. I've not tried it on a lower TF but it should work in the same way.
Which pairs are traded is determned by the true/false settings below
TradeAUDPairs
TradeCADPairs
TradeCHFPairs
TradeEURPairs
TradeGBPPairs
TradeJPYPairs
TradeNZDPairs
TradeUSDPairs
As posted, the bot only trades EURJPY, EURUSD, USDJPY. You can change that by setting other currencies to true. However, if you trade all pairs there is a lot of activity so maybe tone it down until you can see what is going on.
There is a trading hours setting which I have configured for my broker time. The idea is to not open trades from the last hour of US session to the beginning of the Asian session so you may need to modify this setting to your own Broker.
I've had this on demo since the beginning of the month and what I have found is that of the closed trades, about 50% close at breakeven or a tiny profit.
another 40% close with a small loss and 10% close at my emergency stop set at 0.5 of a daily range. and the bot has lost about 5%.
However, for much of the time it has been running with a comfortable open profit which suggests to me that with stacking introduced to the mix, there could be something in this.
You do not have the required permissions to view the files attached to this post.
-
fxarun
- Trader
- Posts: 41
- Joined: Tue Feb 07, 2012 10:21 am
- Location: Chennai India
Re: Building an Equity millipede:- Long Term Position Tradin
Hi Dc,
Thanks for sharing.
I think this one has got legs .
As of now i m closing the trades manually when i get reverse positons opened.
Lets see how it goes next week.
Regards,
Arun
Thanks for sharing.
I think this one has got legs .
As of now i m closing the trades manually when i get reverse positons opened.
Lets see how it goes next week.
Regards,
Arun
"It's not the strongest species that survive, nor the most intelligent, but the one most responsive to change"
-- Darwin.
-- Darwin.
-
triplex
- Posts: 3
- Joined: Sun Dec 04, 2011 11:05 am
Re: Building an Equity millipede:- Long Term Position Tradin
Hello dietcoke,
look at this thread, oathbreaker tries something similar then your Methode :
http://www.stevehopwoodforex.com/phpBB3 ... =16&t=1471
regards
Thorsten
look at this thread, oathbreaker tries something similar then your Methode :
http://www.stevehopwoodforex.com/phpBB3 ... =16&t=1471
regards
Thorsten
-
dietcoke
- Trader
- Posts: 162
- Joined: Tue Nov 15, 2011 9:59 pm
Re: Building an Equity millipede:- Long Term Position Tradin
fxarun wrote:Hi Dc,
Thanks for sharing.
I think this one has got legs .
As of now i m closing the trades manually when i get reverse positons opened.
Lets see how it goes next week.
Regards,
Arun
Hello dietcoke,
look at this thread, oathbreaker tries something similar then your Methode :
viewtopic.php?f=16&t=1471
regards
Thorsten
Thanks guys,
Arun, this not about closing positions early. It's about taking low risk entries onto which you can stack trades.
Thorsten, oathbreaker's thread is very interesting and convinces me that there is plenty in this trading method.
There are a couple of difference though in what I propose:
a) My entry is more about looking for a turning point than entering an established direction. oathbreaker's entry method, however, looks like a nice straightforward stacking method which I can see will complememt my entry method well
b) When I implement stacking, I plan to take occasion profits but rather than close the trades with the greatest profit, I will be closing those which are closest to be stopped out.
The way oathbreaker's system works as described, the currently open trades will follow the trend upwards.
lets say you have a TP of 500pips and EURUSD is trending up. I have 11 open positions at:
1.300, 1.305, 1.310, 1.315, 1.320, 1.325, 1.330, 1.335, 1.340, 1.345, 1.350.
All are set to stop at breakeven except the trade at 1.35.
sys1)At that point,Ive hit my TP on the the 1.30 trade? I have 500pips.
sys2)On the other hand, if I have a diversification strategy instead (where i close the least profitbl 50% of my open trades whenever a Stop is hit). I will run my open profit.
If there is then a retrace to 1.325:
sys1) 1.325, 1.330, 1.335, 1.340, 1.345 all close at BE 1.350 -50pips net 450pips. Trdes left: 1.305, 1.310, 1.315, 1.320
sys2) 1.350 closes -50pips, Diversify 50% open trades when a trade closes at a loss so, close 1.325, 1.330, 1.335, 1.340, 1.345 (all at 1.345 for net gain of 500pips). trades left:1.300, 1.305, 1.310, 1.315, 1.320
The difference is that this way there is an extra trade left and its your most profitable one. Hopefully to one day realise many 000's of pips.
