10points 3.mq4 - page 408

 

nevermind!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1

 
newdigital:
It is MTF EA and any backtest is not valid.

OsMatf=0

Cogtf1=0;

Cogtf2=0.

0 - means current timeframe. If you are trading on h1 so 0 = H1. if you are trading on M1 so 0 = M1.

In this case - backtest is valid. Because you are backtesting on H1 and indicators are used on H1 too.

But if

OsMatf=30 (M30 timeframe)

Cogtf1= 30 (M30 timeframe)

Cogtf2=240 (H4 timeframe)

so backtest is not valid. Because strategy tester is using 1 timerframe only when backtesting.

It is MTF EA (EA is using 3 timeframes simultaniously - current anyone trading by you, M30 and H4 by default settings). I mean: you attach EA to 1 chart (M1 for example) but EA will use all 3 timeframes: M1, M30 and H4 on the same time.

Yes, this EA will survive longer on H1 than on M1.

Hi, Newdigital,

Thank you for your explanation. Will test with this new understanding.

When you have a moment, could you replace, once for all, the question marks below with valid value or value range and its meaning, so that all newbies like me know what we are doing when we play with different parameter values.

Magic=41951 // make positions unique to this EA, can be any unique number.

EcnBroker=1 // ?

TakeProfit=50.00000000 // ?

Lots=0.01000000 // Starting lot size?

InitialStop=0.00000000 // ?

TrailingStop=20.00000000 // ?

MaxTrades=10 // ?

Pips=20 // ?

slippage=5 // Allows entry with 5 slippage or less?

SecureProfit=5 // ?

AccountProtection=1 // ?

OrderstoProtect=3 // ?

ReverseCondition=0 // ?

bar=1 // ?

mm=0 // 0 = no money management, 1 = lot size is dependent on equity?

risk=0.10000000 // ?

lotincrease=1.63000000 // ?

SpreadProtection=1 // ?

PipTolerance=5 // ?

OsMA_is=OsMa Settings // (M30 timeframe), 0 - means current timeframe

FastEMA=12 // ?

SlowEMA=26 // ?

SignalSMA=9 // ?

OsMatf=30.00000000 // ?

CenterofGravity_isv=Center of Gravity Settings // ?

Per=10 // ?

Price=4 // ?

Cogtf1=240.00000000 // (H4 timeframe), 0 - means current timeframe

Cogtf2=30.00000000 // (M30 timeframe), 0 - means current timeframe

T3VhfPeriods_is=VHF Settings // ?

VHF_Period1=14 // ?

T3Period1=5 // ?

T3Price1=0 // ?

T3Hot1=0.70000000 // ?

T3Original1=1 // ?

VHF_Period2=7 // ?

T3Period2=5 // ?

T3Price2=0 // ?

T3Hot2=0.70000000 // ?

T3Original2=1 // ?

_smi=Smi Settings // ?

Length=13 // ?

Smooth1=25 // ?

Smooth2=2 // ?

Signal=5 // ?

SmiPrice=0 // ?

Many thanks.

forexjim

 
newdigital:
It is MTF EA and any backtest is not valid.

OsMatf=0

Cogtf1=0;

Cogtf2=0.

0 - means current timeframe. If you are trading on h1 so 0 = H1. if you are trading on M1 so 0 = M1.

In this case - backtest is valid. Because you are backtesting on H1 and indicators are used on H1 too.

But if

OsMatf=30 (M30 timeframe)

Cogtf1= 30 (M30 timeframe)

Cogtf2=240 (H4 timeframe)

so backtest is not valid. Because strategy tester is using 1 timerframe only when backtesting.

It is MTF EA (EA is using 3 timeframes simultaniously - current anyone trading by you, M30 and H4 by default settings). I mean: you attach EA to 1 chart (M1 for example) but EA will use all 3 timeframes: M1, M30 and H4 on the same time.

Yes, this EA will survive longer on H1 than on M1.

Hi, newdigital,

Changed all to current timeframe:

OsMatf=0

Cogtf1=0;

Cogtf2=0.

The result sounds the same. Did I miss something?

Thanks for advising.

forexjim

 
newdigital:
No.

I mean: this 10point EA originally was created for H1 timeframe many years ago (and I used it on semi-automatic mode for H1).

This this version - I used M1.

I will forward test started from Sunday/Monday using M1.

So, let's see.

As to backtesting so ... as I see from the code of this EA - it is used OSMA for M30 timeframe and Center of Gravity for M30 and H4 timeframe. I mean: we can select any timeframe to trade but EA will take the value of OSMA on M30 and Center of Gravity on M30 and H4. It was coded inside this EA. In this case - it is MTF EA and any backtest is not valid sorry.

Hi, newdigital,

I re-read your advice. Do you mean by " it is MTF EA and any backtest is not valid sorry" that this EA should never be tested in backtesting but only demo or live?

Thanks for advising.

forexjim

 
forexjim:
Hi, newdigital,

Changed all to current timeframe:

OsMatf=0

Cogtf1=0;

Cogtf2=0.

The result sounds the same. Did I miss something?

Thanks for advising.

forexjim

I explaned it: backtesting is made on current only. We can not backtest EA for m1 timeframe with taking the signals by indicators on M30 and H4. So, if you are backtesting on M1 - all indicators will be for M1.

That is why the results are the same.

As I said - backtest is not valid for MTF EAs. It means: no any conclusion should be made based on backtesting in case of MTF EA.

I will forweard test/trade the setup I posted/traded for m1 and will see.

 
forexjim:
Hi, newdigital,

I re-read your advice. Do you mean by " it is MTF EA and any backtest is not valid sorry" that this EA should never be tested in backtesting but only demo or live?

Thanks for advising.

forexjim

If OsMatf=0, Cogtf1=0 and Cogtf2=0 - can.

If MTF way - can not.

--------------

Some general explanation.

We can backtest MTF EAs just to understand: will EA open the trade, and by which initial lot size. Any other conclusions for backtesting of MTF EAs are not valid.

Same with EAs based on high/low of the bar and on open bar (Firebird EA, and QQ EA for example) - it is exact opposite case for those kind of EAs: backtesting is more good than forward testing. Example is on this post: https://www.mql5.com/en/forum/174805 (it is qq EA by backtesting, and of course - the results are totally dif ferent if trading/forward testing).

To understand about EA and how it was coded - we need to look inside the code: to know - MTF EA, based on high/low of the bar, based on open bar, or normal EA. But we can look inside the code only if we have source code ...

That is why: selling any EA based on backtesting results only is scam in forex meaning of this word.

 

Magic=41951 // EA understand about which order to close/modify based on some number only. programmers call this number as "magic number". For example - if we want to use same EA for 3 different charts (same pairs or different pairs) - we can set magic number to different value for different chart. And EA will understand which trade to close.

EcnBroker=1 // in mql4 programming: 1 = true and0 = false. If 1 so this EA will work for ECN/stp broker. By the way - value 1 is recommended for all the brokers.

TakeProfit=50.00000000 // it is 50

Lots=0.01000000 // yes, starting/initial lot size in case of mm = false.

InitialStop=0.00000000 // yes, 0. EA will martingale instead of stop loss. But it is having some stop loss anyway becayse - how the trades were closed in loss for your backtesting? So, I have no idea ... may be - Account Protection feature?

TrailingStop=20.00000000 // trailing stop for profit.

MaxTrades=10 // max number of trades ... 0.01 and after that 0.02 ....

Pips=20 // I am not sure ... I think - it is the distance in pips between the martingale trades.

slippage=5 // slippage

SecureProfit=5 // do not remember sorry. We need to ask MrTools.

AccountProtection=1 // do not remember sorry. It may be same as for Alpha EA .... some percentages from balance for all trades to be closed in loss as the protection of the account? We need to ask MrTools.

ReverseCondition=0 // buy instead of sell. If 0 so we are not using reverse (0 = false). If 1 - it is bujy instead of sell or sell instead of buy.

bar=1 // bar #1 is closed bar.

SpreadProtection=1 // it is very good feature: EA will not trade during the spread increasing: the brokers are incresing the spread during the forex news events (ngp for example). SO, EA will not trade during the news time. 1 = true (we use it), 0 = false (we do not use this protection).

When you will trade by this EA - look at left top corner of the chart and you will see how this protection in action.

 
newdigital:
If OsMatf=0, Cogtf1=0 and Cogtf2=0 - can.

If MTF way - can not.

--------------

Some general explanation.

We can backtest MTF EAs just to understand: will EA open the trade, and by which initial lot size. Any other conclusions for backtesting of MTF EAs are not valid.

Same with EAs based on high/low of the bar and on open bar (Firebird EA, and QQ EA for example) - it is exact opposite case for those kind of EAs: backtesting is more good than forward testing. Example is on this post: https://www.mql5.com/en/forum/174805 (it is qq EA by backtesting, and of course - the results are totally dif ferent if trading/forward testing).

To understand about EA and how it was coded - we need to look inside the code: to know - MTF EA, based on high/low of the bar, based on open bar, or normal EA. But we can look inside the code only if we have source code ...

That is why: selling any EA based on backtesting results only is scam in forex meaning of this word.

Hi, newdigital,

Thank you so much for taking the time to explain the parameters. I learned so much!

EA: from post #4027

Timeframe: M1

Preset: from post #4049, plus OsMatf=0, Cogtf1=0 and Cogtf2=0

Platform: FXCM mt4

How come each backtest lasted less than 1 month even though it won (see attached)? What is causing the backtest to stop?

Thanks.

forexjim

Reason: