Download MetaTrader 5

When to program an EA for Automated Trading? - page 2

To add comments, please log in or register
Fernando Carreiro
3922
Fernando Carreiro  

goodoboy: Thank you very much Fernanodo for the spreadsheet. It is nice put together for a manual back test. I have similar one that calculates positive expectancy for me as well. i still haven't figured out to write a Excel formula to calculate drawdown from back tested trades. Few more questions please:

1. I am confused on stage 3 and 4.  What do you mean by " fully functional "smart" indicator,"? So you no longer need to manually back test by hand, the indicator will trade for you?

2. What do you mean by filter? I see in your spreadsheet and stages above you mention filter. 

3. What is your opinion or advice or comments regarding attempting to eventually build an EA for the crytopcurrency market? I personally think due to lack historical data its not good idea. It just started trending this year. Just my opinion.

  1. No, an Indicator by definition, does not trade. It is still manual trading and I even stated that. It is just that the "smart" Indicator, calculates and applies all the rules and presents them visually on the chart with the exact values presented in the Data Window - Entry Price, Stop-Loss, Risk calculations as well as Trailing-Stop, M.A.E. & M.F.E. during the trade duration and then the final exit point and price, etc. - It just makes it easier to make sure all the rules are being applied mechanically without emotional bias and facilitates recording the trade on the spreadsheet (see example image below).
  2. Filters are those extra conditions you may apply to the main rules, such as which session or time of day to trade, or maybe previous day's trend direction, or maybe minimum or maximum deviations, or whatever.
  3. I don't trade "crypto-currencies" at all. I consider them too volatile and unpredictable!


goodoboy
105
goodoboy  
Fernando Carreiro:
  1. It is my strong opinion, that you should always manually back-test a strategy even before considering constructing an EA for it.

Hello Fernando, 

I would also comment its a good to manually back test strategy so when do back test I can confirm the back test is performing correctly and matching the back test. 

goodoboy
105
goodoboy  
Fernando Carreiro:
  1. No, an Indicator by definition, does not trade. It is still manual trading and I even stated that. It is just that the "smart" Indicator, calculates and applies all the rules and presents them visually on the chart with the exact values presented in the Data Window - Entry Price, Stop-Loss, Risk calculations as well as Trailing-Stop, M.A.E. & M.F.E. during the trade duration and then the final exit point and price, etc. - It just makes it easier to make sure all the rules are being applied mechanically without emotional bias and facilitates recording the trade on the spreadsheet (see example image below).
  2. Filters are those extra conditions you may apply to the main rules, such as which session or time of day to trade, or maybe previous day's trend direction, or maybe minimum or maximum deviations, or whatever.
  3. I don't trade "crypto-currencies" at all. I consider them too volatile and unpredictable!



Thank you very much, I understand now. 

Fernando Carreiro
3922
Fernando Carreiro  
goodoboy: I would also comment its a good to manually back test strategy so when do back test I can confirm the back test is performing correctly and matching the back test. 

Yes, that is absolutely correct!

You use the manual back-test results to make absolutely sure the coder has in fact reproduce all your rules and that the EA is working correctly according to the specifications.

For self coders, it is just as important to check ones EA against the manual back-test.

Thank you for reminding me about it. I am just so used to doing it implicitly that it did not come to mind.

goodoboy
105
goodoboy  
Fernando Carreiro:

Yes, that is absolutely correct!

You use the manual back-test results to make absolutely sure the coder has in fact reproduce all your rules and that the EA is working correctly according to the specifications.

For self coders, it is just as important to check ones EA against the manual back-test.

Thank you for reminding me about it. I am just so used to doing it implicitly that it did not come to mind.


Thanks Fernando for response. 

I have programmed a few strategies in NinjaTrader a few months ago and guess what the #1 thing that come in my head often? It was "Do I trust NinjaTrader back test results"? I realized I had no governing document or statics to check against the backtesting simulation. Doing a manual back test as you stated has two advantages in the beginning stages of strategy development 1) manual back test checks the coder 2) manual back test checks the simulation software. 

Thanks

goodoboy
105
goodoboy  
Fernando Carreiro:


  1. Stage 7 - Diversified Back-testing:
    Now, I will carry out back-testing using the MetaTrader's Strategy Tester (always using real tick data) on various Symbols and Time-frames in order to get a feel for the overall impact it has and to see in a definitive manner how promising it can be in terms of profitability. I will also carry out some optimisation tests if needed, but this is usually rare, as I try to develop strategies that don't use fixed values but instead rely on market variables and indicator values, in order to define sizes for stops (such as S/L, T/S, B/E, T/P) as well as some other indicator parameters.

Hello Fernando Carreiro, 

Really appreciate your work flow process and I have started using it and I fully understand why you say manually back test the idea first to measure performance before proceeding to more defined testing. 

During Stage 7, how many years of historical data do you perform back testing? Or I guess a better question is what do recommend for number of trades of back test to measure statistically significance?

I was thinking of using most recent market conditions, 2014 to 2016 for in sample back testing and design at this stage. Then 2016-2017 as out of sample testing. Then proceed to stage 8 if out of sample testing is good.

My strategies are intra day systems development and looks for one trade per day. 

I appreciate your comments. 

Fernando Carreiro
3922
Fernando Carreiro  
goodoboy:

Hello Fernando Carreiro, 

Really appreciate your work flow process and I have started using it and I fully understand why you say manually back test the idea first to measure performance before proceeding to more defined testing. 

During Stage 7, how many years of historical data do you perform back testing? Or I guess a better question is what do recommend for number of trades of back test to measure statistically significance?

I was thinking of using most recent market conditions, 2014 to 2016 for in sample back testing and design at this stage. Then 2016-2017 as out of sample testing. Then proceed to stage 8 if out of sample testing is good.

My strategies are intra day systems development and looks for one trade per day. 

I appreciate your comments. 

Stage 7 is still somewhat lax because the EA is still being analysed and refined. I don't define a specific test period, but I do look for a minimum number of trades (at least 100, equivalent to number mentioned for Stage 5). Out-of-sample tests are only needed if your EA requires optimisation.

However, you don't have to follow my exact "recipe". Use it more like a guideline and adapt it to your own personality and requirements.

goodoboy
105
goodoboy  
Fernando Carreiro:

Stage 7 is still somewhat lax because the EA is still being analysed and refined. I don't define a specific test period, but I do look for a minimum number of trades (at least 100, equivalent to number mentioned for Stage 5). Out-of-sample tests are only needed if your EA requires optimisation.

However, you don't have to follow my exact "recipe". Use it more like a guideline and adapt it to your own personality and requirements.


Thank you Fernando for responding to me. 

Yes, I have used your steps as guidelines and mixed in a few more stages from other books or other resources I have read and analyzed. 

One thing I am learning is there is no concrete , or set in stone, period required when back testing an idea. Some traders use +5 years, or even +10 years, or even 1 year or 6 months. It depend on the trader or system developer goals of the edge. And what makes the most the sense. 

12
To add comments, please log in or register