Backtesting/Optimization - page 41

 

Mising part

please help me to find out, whats wrong with my chart just for usd/jpy,

there is a big gap i mean missing, how can i load the 2 years tim period?

thanks

Files:
aaa.jpg  46 kb
 
jumpman:
please help me to find out, whats wrong with my chart just for usd/jpy,

there is a big gap i mean missing, how can i load the 2 years tim period?

thanks

This is not a gap, you have missed the data. Delete this file USDJPY240.hst, restart MT4 and download the data again.

 

ok, i deleted the file and restarted it again but there is the same situation,it doesn't update the file! or do i have to download by myself?

please help,

 

i did!!!

thanks linuxser

tools--) then f2 download the history of the pair, (the solution)

 
jumpman:
i did!!!

thanks linuxser

tools--) then f2 download the history of the pair, (the solution)

Glad you could find the solution, but by deleting the data file you're forcing MT4 to re-download the data again. The way you've used to fix it is download data from Metaquotes, not from your borker.

If you have missing data it's because:

1.Your broker have a big problem.

2.Your platform is too old and because that the included data is old too and for some reason the software is not filing at all, maybe because your broker does not have that period of data.

 

i didin t have that problem before, when i reload my xp (format) i ve had this kind of problem since then.

Now it seems ok but i loads slower now.

we will see...

thank you

 

Objective function for optimization

After using Metatrader for optimization of trading strategies for a few months I am not happy with it for a variety of reasons and thinking about writing my own tester/optimizer in Matlab and one of the most difficult questions I am facing is: what should the objective function look like? I have identified at least three parameters I would like to include into the objective function (fixed lot trading, no money management):

1) Maximum slope of the linear regression line of the equity curve (want equity curve to be as steep as possible)

2) Minimum sum of squared residuals of the linear regression line of the equity curve (want equity curve to be as linear as possible)

3) Maximum number of trades (want to trade as often as possible while not scalping)

However I am not sure what is the best way to combine them together to form the objective function for the optimizer. Should it be something like

(slope of linear regression) * (number of trades) / (sum of squared residuals) or some other combination of exp(), ^x, log() of these parameters (no Sharpe ratio please).

Should other parameters be included?

If anyone has experience developing objective functions for trading systems and feels like sharing it I would greatly appreciate your feedback.

 

Strategy Tester & current bar

Hi there,

If i try any EA.. with any indicators in it.. i will have different result from the chart and from the journal..

I pointed in RED.. the differents..

What can i do to have on chart and in the journal same value.. ?

Because when i make an EA.. i use the chart value.. and i am really confused..

Files:
current_line.jpg  712 kb
 

I am not sure but I see the price for sell order and close order price on the chart and in journal and it is the same one. As to value of MACD indicator so just value in in the journal (in red) and you may see it on the chart in selarate window: it is not written but using mause it is possible).

I am not really sure but I think that standard MACD is using:

if(MacdCurrent>0 && MacdCurrentSignalPrevious && MacdCurrent> (MACDOpenLevel*Point) && MaCurrent<MaPrevious)

It means the following:

- if MACD value of closed bar is above 0;

and

- MACD value of closed bar < Signal line value of same closed bar;

and

- MACD value of previous closed bar is above Signal line value of previous closed bar;

- MACD value of closed bar > MACDOpenLevel*Point (MACDOpenLevel is in the settings of the EA);

and so on

...

As I understand, MACD value of closed bar is value of MACD on previous bar. Because bar should be closed. Nearest close bar. Bar closed - order openes.

So, it is not the value of MACD on the same bar with your arrow on the chart. I think it is previous bar (nearest closed bar).

 

I did another screenshot and added Stochastic line and signal.. and also i let only MACD Current Line..

And right now i hope its pretty obviously that what its on chart its not the same like in journal..

Thx

Files:
Reason: