Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
I'm trying to program my first expert advisor..
And I want to use 2 indicators. -- MACD and Stochastic..
I want to use them on 2 different time periods. --
The MACD on daily chart (iMACD(1440,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0))
and the Stochastic on 1 hour chart (iStochastic(60,0,5,3,3,MODE_SMA,0,MODE_MAIN,0)).
I want to set the buying and selling signals using the results of those two indicators.
In back-testing, I'm supposed to establish the period of back-testing -- And I cannot choose both daily chart for MACD and also hourly chart for Stochastic.
If I'm using back-testing on the Daily chart, MetaTrader loads both the MACD and the Stochastic with daily parameters (AND I DON'T KNOW WHY...), and thus, I cannot use different time periods. -- I have tested the stochastic with both the 60 minutes time interval and 1440 time interval and obtained the same resuts (
Does anyone know:
1. How I can perform back-testing for 2 different time periods for the 2 indicators I want to use in my EA?
2. If I'm using this kind of expert advisor in forward testing, when comparing the results of the indicator, MetaTrader shall use the time periods stated by me in the EA code, or it shall use the time period of the chart the EA is set on?
I'm trying to program my first expert advisor..
And I want to use 2 indicators. -- MACD and Stochastic..
I want to use them on 2 different time periods. --
The MACD on daily chart (iMACD(1440,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0))
and the Stochastic on 1 hour chart (iStochastic(60,0,5,3,3,MODE_SMA,0,MODE_MAIN,0)).
Daniel,
Function call is wrong. The first parameter is the currency pair and the second parameter is the time frame. The defaults are NULL-Current chart (first parameter) and 0-current chart time frame (second parameter).
Function call is wrong. The first parameter is the currency pair and the second parameter is the time frame. The defaults are NULL-Current chart (first parameter) and 0-current chart time frame (second parameter).
Thanks a lot..
It seems it's working.. (I mean, -- I get different results .. if I use the daily and hourly charts)
but the .. the EA still loses money.. --- I need to learn more to make it work.