Hello, fellow traders
I need your help in development of the IB strategy (or better say - methodology) which will be adjustable to changing market conditions. I've got a strong gut feeling that I'm close.... but some small piece of puzzle is missed.
Intro
Last couple of weeks I'm trying to implement the strategy which utilizes IB. What I've encountered that in general the idea of using inside bars as some entry signal is quite good but it requires some additional filters to skip false signals. Also to make the strategy be able to work in the long run (3-5-7 years) in the conditions when the market is constantly changing we need some methodology to adjust these filters to these new conditions. What I've come to is just adding an ATR and to measure the "parent" bar from inside bar pattern against it - i.e. if "parent" bar's body N (let's call it ATRCoeff) times bigger than ATR for some prev number of bars we are considering this as a significant signal and placing our orders.
As the result I've got a strategy based on only 4 parameters - ATR period, ATR shift, % of balance to risk (balance risk ratio) and Parent Bar Body to ATR ratio. And getting the right combination of these four parameters we can have a strategy which can be adjusted to any market conditions. But the question which I would like to raise - and which I would like you to help me to answer! - is what methodology can be used to find these combinations of parameters which more or less suitable for the current market. I've some thoughts on this - they will be at the end of this post.
Sp here we go...
Strategy
Setup:
1. Waiting for IB pattern to form
2. Checking if "parent" bar is ATrCoeff times bigger than ATR
3. If yes - pleasing SELLSTOP on the low of "parent" bar and BUYSTOP on its high
4. When one of these orders is hit - deleting opposite one
Money Management:
1. We are risking only some % of our balance - it's our RiskRatio coefficient
2. SL in pips is calculated based on RiskRatio parameter
3. TP is taken is either SL in pips or "parent" bar's (whatever is higher)
4. Once the we have opened order - after some period of time trailing the SL.
Here is the EA
Parameters:
ATRPeriod - numberof bars for ATR to calculate;
ATRShift - shift ATR for specified number of bars;
ATRCoeff - this coefficient sets what should be the ration "Parent Bar's body"/ATR;
RiskRatio - what percent of account we are risking per trade - i.e. if it's 0.05 then we are risking 5%;
LotsPer100 - this parameters sets how many lots we are setting per each $100 of balance; (set to 0.02)
TrailStopIntervalMins - time in minutes to check for SL trailing; (always set to 60 by default)
TrailStop - turn trail stop on and off; (always set to ON)
OrderShiftATR - this paameter allows to shift pending orders high/lower based on ATR value ; (for now always set to 0)
Experiments
In order to figure out - whether in general this strategy works I've performed following experiments.
For each year from 2006 to 2015 I've tried to find some combination of these four parameters - ATRPeriod, ATRShift, ATRCoeff and RiskRatio - which is close to optimal - i.e. give the best possible result in terms of balance.
Initial Balance: $3000
Pair: EURUSD
2006:
ATRPeriod = 12
ATRShift = 2
ATRCoeff = 2.5
RiskRatio = 0.07
2007:
ATRPeriod = 18
ATRShift = 1
ATRCoeff = 1.7
RiskRatio = 0.05
2008:
ATRPeriod = 20
ATRShift = 0
ATRCoeff = 2.2
RiskRatio = 0.05
2009:
ATRPeriod = 10
ATRShift = 2
ATRCoeff = 1.5
RiskRatio = 0.03
2010:
ATRPeriod = 12
ATRShift = 5
ATRCoeff = 1.4
RiskRatio = 0.06
2011:
ATRPeriod = 10
ATRShift = 3
ATRCoeff = 1.2
RiskRatio = 0.1
2012:
ATRPeriod = 10
ATRShift = 0
ATRCoeff = 1
RiskRatio = 0.06
2013:
ATRPeriod = 14
ATRShift = 4
ATRCoeff = 2.7
RiskRatio = 0.06
2014:
ATRPeriod = 12
ATRShift = 0
ATRCoeff = 1
RiskRatio = 0.1
2015:
ATRPeriod = 18
ATRShift = 5
ATRCoeff = 1.3
RiskRatio = 0.08
(didn't manage to attach - says max num of atachments reached, Total net profit - 12227.26)
Please also note that I've selected the best results I've found - but there are also lots of different parameters combinations which easily doubles and triples account YoY.
So based on these stuff I've made a conclusion that the strategy is pretty ok, it can give a significant multiplication of our deposit.... but! Here comes the problem which I need your help to solve...
Problem
And the problem is: what methodology/approach/??? etc can we use to tune these four parameter - i.e. from time to time - each 1, or 3, or 6, or 12 months - check the current market state, identify the combination of parameters which is not necessary optimal but more or less close to, and use this combination to trade. After 1-3-6-12 moths again - look at the market, tune parameters, continue. From my perspective the success criteria will be following: backtesting this methodology could allow us on average to at least double the account YoY and for at least 10 years. Why doubling?
Here are the approaches I'm testing right now:
Let's say we want to tune parameters each 1 month. So I'm trying to find how I can more or less closely predict ATR based on the 3-6 moths of previous history.
How based on previous 3-6 moths we can predict whether we should increase RiskRatio coefficient - i.e. start trading more risk - or in opposite - it should be decreased.
I aslo feel that it somehow similar to how the people adjust their trading decisions based on what they see - something like "I'm looking on the chart, checking X,Y and Z and saying to myself - now the market is in condition A(or B,C.....)" - so I need to figure out what to pay attention to when looking onto the bigger picture.
So... what do you think? In fact I'm a little bit lost in all these combinations so any ideas, suggestions, critics, pointing on my mistakes - will be highly appreciated.
I'll be also posting my results here according to the progress in my research. Also I believe that if collectively we'll figure out the approach - as the result we'll have a really really powertool (semi)automatic tool to trade with good profits and in the long run.
I need your help in development of the IB strategy (or better say - methodology) which will be adjustable to changing market conditions. I've got a strong gut feeling that I'm close.... but some small piece of puzzle is missed.
Intro
Last couple of weeks I'm trying to implement the strategy which utilizes IB. What I've encountered that in general the idea of using inside bars as some entry signal is quite good but it requires some additional filters to skip false signals. Also to make the strategy be able to work in the long run (3-5-7 years) in the conditions when the market is constantly changing we need some methodology to adjust these filters to these new conditions. What I've come to is just adding an ATR and to measure the "parent" bar from inside bar pattern against it - i.e. if "parent" bar's body N (let's call it ATRCoeff) times bigger than ATR for some prev number of bars we are considering this as a significant signal and placing our orders.
As the result I've got a strategy based on only 4 parameters - ATR period, ATR shift, % of balance to risk (balance risk ratio) and Parent Bar Body to ATR ratio. And getting the right combination of these four parameters we can have a strategy which can be adjusted to any market conditions. But the question which I would like to raise - and which I would like you to help me to answer! - is what methodology can be used to find these combinations of parameters which more or less suitable for the current market. I've some thoughts on this - they will be at the end of this post.
Sp here we go...
Strategy
Setup:
1. Waiting for IB pattern to form
2. Checking if "parent" bar is ATrCoeff times bigger than ATR
3. If yes - pleasing SELLSTOP on the low of "parent" bar and BUYSTOP on its high
4. When one of these orders is hit - deleting opposite one
Money Management:
1. We are risking only some % of our balance - it's our RiskRatio coefficient
2. SL in pips is calculated based on RiskRatio parameter
3. TP is taken is either SL in pips or "parent" bar's (whatever is higher)
4. Once the we have opened order - after some period of time trailing the SL.
Here is the EA
Attached File(s)
InsideBarBreakout.ex4
18 KB
|
394 downloads
Parameters:
ATRPeriod - numberof bars for ATR to calculate;
ATRShift - shift ATR for specified number of bars;
ATRCoeff - this coefficient sets what should be the ration "Parent Bar's body"/ATR;
RiskRatio - what percent of account we are risking per trade - i.e. if it's 0.05 then we are risking 5%;
LotsPer100 - this parameters sets how many lots we are setting per each $100 of balance; (set to 0.02)
TrailStopIntervalMins - time in minutes to check for SL trailing; (always set to 60 by default)
TrailStop - turn trail stop on and off; (always set to ON)
OrderShiftATR - this paameter allows to shift pending orders high/lower based on ATR value ; (for now always set to 0)
Experiments
In order to figure out - whether in general this strategy works I've performed following experiments.
For each year from 2006 to 2015 I've tried to find some combination of these four parameters - ATRPeriod, ATRShift, ATRCoeff and RiskRatio - which is close to optimal - i.e. give the best possible result in terms of balance.
Initial Balance: $3000
Pair: EURUSD
2006:
ATRPeriod = 12
ATRShift = 2
ATRCoeff = 2.5
RiskRatio = 0.07
2007:
ATRPeriod = 18
ATRShift = 1
ATRCoeff = 1.7
RiskRatio = 0.05
2008:
ATRPeriod = 20
ATRShift = 0
ATRCoeff = 2.2
RiskRatio = 0.05
2009:
ATRPeriod = 10
ATRShift = 2
ATRCoeff = 1.5
RiskRatio = 0.03
2010:
ATRPeriod = 12
ATRShift = 5
ATRCoeff = 1.4
RiskRatio = 0.06
2011:
ATRPeriod = 10
ATRShift = 3
ATRCoeff = 1.2
RiskRatio = 0.1
2012:
ATRPeriod = 10
ATRShift = 0
ATRCoeff = 1
RiskRatio = 0.06
2013:
ATRPeriod = 14
ATRShift = 4
ATRCoeff = 2.7
RiskRatio = 0.06
2014:
ATRPeriod = 12
ATRShift = 0
ATRCoeff = 1
RiskRatio = 0.1
2015:
ATRPeriod = 18
ATRShift = 5
ATRCoeff = 1.3
RiskRatio = 0.08
(didn't manage to attach - says max num of atachments reached, Total net profit - 12227.26)
Please also note that I've selected the best results I've found - but there are also lots of different parameters combinations which easily doubles and triples account YoY.
So based on these stuff I've made a conclusion that the strategy is pretty ok, it can give a significant multiplication of our deposit.... but! Here comes the problem which I need your help to solve...
Problem
And the problem is: what methodology/approach/??? etc can we use to tune these four parameter - i.e. from time to time - each 1, or 3, or 6, or 12 months - check the current market state, identify the combination of parameters which is not necessary optimal but more or less close to, and use this combination to trade. After 1-3-6-12 moths again - look at the market, tune parameters, continue. From my perspective the success criteria will be following: backtesting this methodology could allow us on average to at least double the account YoY and for at least 10 years. Why doubling?
Here are the approaches I'm testing right now:
Let's say we want to tune parameters each 1 month. So I'm trying to find how I can more or less closely predict ATR based on the 3-6 moths of previous history.
How based on previous 3-6 moths we can predict whether we should increase RiskRatio coefficient - i.e. start trading more risk - or in opposite - it should be decreased.
I aslo feel that it somehow similar to how the people adjust their trading decisions based on what they see - something like "I'm looking on the chart, checking X,Y and Z and saying to myself - now the market is in condition A(or B,C.....)" - so I need to figure out what to pay attention to when looking onto the bigger picture.
So... what do you think? In fact I'm a little bit lost in all these combinations so any ideas, suggestions, critics, pointing on my mistakes - will be highly appreciated.
I'll be also posting my results here according to the progress in my research. Also I believe that if collectively we'll figure out the approach - as the result we'll have a really really powertool (semi)automatic tool to trade with good profits and in the long run.
www(.)darkmindfx(.)com - free COT and US economic indicators