[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 179

 
thank you all, .... for your help!
 

How do I make the EA look at the last two bars, zero and the first, shift - in iCusot?

double iCustom(	string symbol, int timeframe, string name, ..., int mode, int shift)


 
1Rakso >> :

How do I make the EA look at the last two bars, zero and the first, shift - in iCut?



Line_Bar_0 = iCustom(string symbol, int timeframe, string name, ..., int mode, 0);
Line_Bar_1 = iCustom(string symbol, int timeframe, string name, ..., int mode, 1);
Line_Bar_2 = iCustom(string symbol, int timeframe, string name, ..., int mode, 2);
 
granit77 >> :

>> Thank you, granit77!

Is this correct, I understand it will analyse zero bar and 1 or am I wrong?
#define BARS_TO_ANALYSE 100



int start()
{
   double mainLine;
   double prevMainLine;
   double signalLine;
   double prevSignalLine;
      
   for(int a=0; a< BARS_TO_ANALYSE; a++)
   {
      mainLine=iStochastic(0,0,5,3,3,MODE_SMA,0,MODE_MAIN, a);
      prevMainLine=iStochastic(0,0,5,3,3,MODE_SMA,0,MODE_MAIN, a+1);
      signalLine=iStochastic(0,0,5,3,3,MODE_SMA,0,MODE_SIGNAL, a);
      prevSignalLine=iStochastic(0,0,5,3,3,MODE_SMA,0,MODE_SIGNAL, a+1);


 
1Rakso писал(а) >>

Thank you, granit77!

This is correct, I understand it will analyze zero and 1 bar or am I mistaken?

If you need 0 and 1 bars why do you use a loop? If you just need to get values from 1 and 0 bars then remove the loop and a=0

 

- Please explain how MT simulates ticks???

For example, I am running an EA on the DAILY chart. What happens "inside"?

From whether the price went straight up from the bottom or went to the middle of the candle, then came back down,

and then up, or any number of other possible scenarios, whether the test

in any way corresponds to reality or not.

- What is the smallest time resolution for the Day timeframe in the test,

which is fully consistent with the real data? (say 1 minute / 5 minutes / ...?)

 

Inside the bar, the ticks are modelled by the software almost from a "torch".

Therefore, the lower the timeframe, the more reliable the result.

Strategy Tester: Simulation modes for testing trading strategies'.

 

to chief2000

Open the tester and read what it says on line 3 (Model:), there are 3 options, read them carefully

It is hard to find a more comprehensive answer than what is written there.

 
rid >> :

Inside the bar, the ticks are modelled by the software almost from a "torch".

Therefore, the smaller the timeframe, the more reliable the result.

Strategy Tester: Modes of simulation when testing trading strategies'.

It's not as simple as that - day charts have a longer history...

For minute or five-minute charts, etc. the period in question is too short to be able to

to draw any conclusions at all. For example, in the last two years the market hasn't been behaving

differently than it was before. Although if there is no correspondence with reality inside the Daily Bar it is even worse.

One of the options is to try to download the real story for small timeframes from the brokers.

We would have to redo the Expert Advisor... Hmmm!

By the way, when we download the history from MT's archive it says that these quotes are from MetaQuotes. But on the website of

It says to download our quotes via MT (but the history is not so big).

- How does it work?

And FOREX.COM seems to offer ASCII from the site.

 
Urain >> :

to chief2000

Open the tester and read what is written in 3 lines (Model:), there are 3 options re-read them carefully

It's hard to find a more comprehensive answer than that.

Модель	Все тики (наиболее точный метод на основе всех наименьших доступных таймфреймов)


That's where it all started - on the D1 chart, testing starts in 2003, but on smaller

But at smaller timeframes I haven't seen anything close to that date - testing of the same Expert Advisor on 5 minutes starts from the beginning of 2009 !

I.e. on the DAILY testing from 2003 to early 2009 is, to put it mildly, "untrue" :)

Why then try to squeeze the maximum out of the Expert Advisor on such a database? I will be glad if I am wrong.

Reason: