I am wondering for the sake of discussion, if we have a given system, it doesn’t matter which one, and that system has only 30% of success, does that mean that those 30% are bound to only opening trades in one direction or it doesn’t matter?
For example if we use Exponential Moving Average crossover of EMA 10 and EMA 20 to generate BUY and SELL signals and if that system has 30% of success, does that mean that we will achieve those 30% only by opening, lets say, just BUY positions or that doesn’t matter and we can open a position every time we get a signal be it a BUY or a SELL?
[U]If[/U] you trade [B]each and every signal[/B], i.e. EMA’s crossover, in 1 hour chart timeframe as the best choice for such a system, [U]then[/U] you’ll always find yourself in profit at the end of each and every week.
You’ll lose pips in the ranges but it is sure that you’ll be riding on those trains that carry the pips by tons and dozens.
[B][U]Important:[/U][/B] not a single signal (either BUY or SELL) may not be missed for this system to work as described. (you shouldn’t sleep, eat, go to Frank’s etc. lol…that’s a joke, an EA can do that for you)
Note : you can filter the trade by determining the trend by a third, slow, MA let’s say 200EMA. If price and the faster MA’s are above the 200EMA you take only the signals for long trades, vice versa for short trades.
It is that easy to make money in Forex, CFD’s and stocks, no kidding.
PS. In fact, only EMA50 is required to make money; price crosses above 50EMA=long trade, below for short.
I use it for trading manually.
By applying a slow EMA (e.g. 200EMA) for confirming the trend and sticking to trading hours between European pre-market (06:00 GMT) and NYSE close (22:00 GMT) the result can be very profitable.
Don’t forget to modify parameters according to the ma’s of choice + if you google “2ma crossover” there is lots of info on the subject.
But what I wanted to know is what is the best way mathematically to determine the success of one system. Is it by going only in one direction and testing to see the number of outcomes, or in both directions?
Heh I’ll be sure to spend them wisely…Thanks I’ll check it out
either one, the pip-harvesting trades last a lot longer than one single day, there have been months with 1200-1500pips gains, i guess that makes it 40-50/day (assuming you earn pips also in the weekends in spite of the markets being closed, lol)
I’m thinking mathematically if you want to test a system is it better to test it only using BUY generated signals or use both BUY and SELL? For instance if you were to throw a coin 1000x, if you would stick to calling a HEAD always prior to every flip your percentage would be around 50%, but if you would randomly chose the HEAD or TAILS tour percentage would be less than 50%?
You would look at the systems win rate, loss rate, average pips per win and average pips per loss. Remember you can make money selling or buying a pair. I ll run some backrests on the moving average systems mentioned in here tomorrow and post the results claimed. If you want a mathematical / statistical way of judging the performance of a system, read Evidence Based Technical Analysis
So we start with the strategy outlined in post two. Please correct me if I misunderstood you in anyway.
Enter on every EMA crossover.
Daily Chart
Enter Long on a break above the 50 EMA
Enter Short on a break below the 50 EMA
Always in the market.
This is the Zorro Code I used, you are free to test it out for yourself.
function run()
{
set(TICKS);
StartDate = 2009; // Date to start trading from
BarPeriod = 1440; // 1440 minutes equate to one day
LookBack = 150;
//Price Series to be used
vars Price = series(priceClose()); // Price based on the close of the daily bar
vars EntryEMA = series(EMA(Price,50)); // An exponential moving average based on the last 50 daily closes
//Entry Conditions
if(crossOver(Price,EntryEMA)) // If Price breaks the 50 EMA from below, enter long
enterLong();
if(crossUnder(Price,EntryEMA)) // If Price breaks the 50 EMA from above, enter short
enterShort();
}
And this is the resulting equity curve when it is tested on EURUSD.
on GBPUSD
So I added the 200 day EMA filter and run the tests again.
function run()
{
//// set(TICKS);
StartDate = 2008; // Date to start trading from
BarPeriod = 1440; // 1440 minutes equate to one day
LookBack = 250;
//Price Series to be used
vars Price = series(priceClose()); // Price based on the close of the daily bar
vars EntryEMA = series(EMA(Price,50)); // An exponential moving average based on the last 50 daily closes
vars SlowEMA = series(EMA(Price,200)); // Using the 200 daily EMA as a price filter
//Entry Conditions
if(crossOver(Price,EntryEMA) && Price[0]>SlowEMA[0] && EntryEMA[0]>SlowEMA[0]){
enterLong();
}
if(crossUnder(Price,EntryEMA) && Price[0]<SlowEMA[0] && EntryEMA[0]<SlowEMA[0]){
enterShort();
}
}
The equity curve for EURUSD
The equity curve for GBPUSD
function hourOpen(int hourblockstart, int hourblockend)
{
//blocks new open trades between selected hours
//uses UTC time
if ( (lhour(UTC) >= hourblockstart) && (lhour(UTC) < hourblockend) )
return 0; //between blocked hours, do not allow trade opens
else
return 1; //no conditions met, allow trades by default
}
function run()
{
//// set(TICKS);
StartDate = 2008; // Date to start trading from
BarPeriod = 1440; // 1440 minutes equate to one day
LookBack = 250;
int hourblockstart = 22; // Stop entering new trades after 22:00 GMT
int hourblockend = 6; // Start entering new trades afer 6:00 GMT
//Price Series to be used
vars Price = series(priceClose()); // Price based on the close of the daily bar
vars EntryEMA = series(EMA(Price,50)); // An exponential moving average based on the last 50 daily closes
vars SlowEMA = series(EMA(Price,200)); // Using the 200 daily EMA as a price filter
//Entry Conditions
if(hourOpen(hourblockstart, hourblockend)){
if(crossOver(Price,EntryEMA) && Price[0]>SlowEMA[0] && EntryEMA[0]>SlowEMA[0]){
enterLong();
}
if(crossUnder(Price,EntryEMA) && Price[0]<SlowEMA[0] && EntryEMA[0]<SlowEMA[0]){
enterShort();
}
}
}
The resulting EURUSD equity curve
The resulting GBPUSD equity curve
Nice, but can you test the EMA 10 and 20 crossover with EMA 200 as a main trend filter and EMA 10 and 20 crossover with the stochastic crossover also (14,3,3) and EMA 200 as a main trend filter? 1H time period
If you have the time to code it I would like to see the results
function run()
{
//// set(TICKS);
StartDate = 2008; // Date to start trading from
BarPeriod = 60; // 1 Hour bars
LookBack = 250;
//Price Series to be used
vars Price = series(priceClose()); // Price based on the close of the daily bar
vars FastEMA = series(EMA(Price,10)); // 10 period EMA
vars SlowEMA = series(EMA(Price,20)); // 20 period EMA
vars FilterEMA = series(EMA(Price,200)); // Using the 200 daily EMA as a price filter
//Entry Conditions
if(crossOver(FastEMA,SlowEMA) && Price[0]>FilterEMA[0] && FastEMA[0]>FilterEMA[0] && SlowEMA[0]>FilterEMA[0]){
enterLong();
}
if(crossUnder(FastEMA,SlowEMA) && Price[0]<FilterEMA[0] && FastEMA[0]<FilterEMA[0] && SlowEMA[0]<FilterEMA[0]){
enterShort();
}
}
Results on EURUSD
Results on GBPUSD, looks to be worth pursuing on this pair.
You can do it with RSI also, just to identify if the price is in overbought, oversold condition prior to crossover… for RSI, the price is in overbought if RSI > 70, and oversold if RSI < 30 Oh, and also look for good trending pairs like GBPJPY or EURJPY
Your pourcentage is always 50% when flipping a coin, it doesn’t matter if you call only HEAD, or call randomly, or if your are in the midlle of a calling pattern pattern where you TAIL once every 10 flip.
If you get better backtests only making BUY orders, it probably means the pair has been rising during the test, or that the specific pattern you trade worked better on the upside than the downside for some reason. But if you consider you have equal chances to win a long or a short, there is no reason not to test both sides. Backtest results generally seperate the win% for each side anyways.
In my opinion, if you backtest the JPY pairs while they have been mostly going steadily up for a long time, be careful not to give a false impression of profitability to the EA: The EA will probably stop being profitable as soon as the JPY trend stops, and than can happen anytime. In the end what would be profitable is your skill to choose the pair that will be trending strongly in the following months, not the EA by itself.