[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 24

 
Roman.:


enter a print instead of your alert and in the test see how the value of the upfractal variable changes with each new bar

You can see the alert right on the screen. Is it more comfortable with a print ?
 
Sergey2011:
Example:

Looked through the help, I don't understand (I don't get it), how to specify in the variable "some_time" being in 15 minutes that I need the previous day, i.e. if today is 25 Jan. 2011 how can I set January 24, 23, 22, etc. to search.

Thanks for the clarification.


OK. Schematic and as an option:

  datetime start_time=D'2011.01.24 00:00';

  datetime end_time=D'2011.01.25 00:00';


  int  start_index=iBarShift("EUROUSD",PERIOD_M15,start_time);
  int  end_index=iBarShift("EUROUSD",PERIOD_M15,end_time)+1;

We have got the bar numbers for the 15 minute frame for January 24, 2011 and we will work with them as we wish.

 
volshebnik:
You can see the alert right on the screen. Is it more convenient with a print ?


If memory serves me correctly, alerts are disabled in the test, we use printers to monitor variable values in the "log" tab for "parsing" of flights.

You can directly step-by-step (bar-by-bar - if explicitly control the opening of a new bar) via F12 and Pause/Break - then look at the log, test visualization graph and make conclusions with appropriate decisions - HOWEVER. :-)))

 
Roman.:


You can do it either way, it's not important :-)))

Have you figured it out now?

Yes, thank you very much for the detailed explanation. I've set it to optimisation for all TFs. I will report on the results after optimisation+testing on different sections.
 
Roman.:

The alerts, if memory serves me correctly, are disabled in the test, the printers monitor the values of the variables in the 'logbook' tab for 'parsing' of the flights.
Aha... Thanks, I'll give it a try.
 
Figar0:


OK. Schematic and as an option:

Got the bar numbers of the 15 minute frame for January 24, 2011 then work with them as we wish.


Thank you FigarO !

I'm a bit difficult, but I think I got it.

 

I am trying to write an EA that trades one day a week on Mondays for example, but I can't. Can someone please advise me how to download such an EA for example.

 
Sergey2011:
Example:

Looked through the help, I do not understand (I do not understand) how to specify in the variable "some_time" being in 15 minutes that I need the previous day, i.e. if today is 25 Jan. 2011 how can I set January 24, 23, 22, etc. to search.

Thanks if you can explain.

The time is stupid, it doesn't give a damn about fifteen minutes or whatever you have.

To work, you need functions iOpen, iClose, see how they work in the help. You don't set the time for them, you only have to specify the offset in bars from the last bar on the chart. 0 is the last bar, 1 is the penultimate bar and so on.

iTime will return the time for the bar with an offset, and then analyse it and build the necessary logic.

And you can also take the daily bars, from which it is easier to steal time. Such as iTime("EURUSD",PERIOD_D1,1) - the beginning of yesterday's day, using it, find the initial shift of the fifteen-minute iBarShift and calculate.

 
asd05:

I am trying to write an EA that trades one day a week on Mondays for example, but I can't. Can someone please advise me how to download such an EA for example.

DayOfWeek function
 
Ereke:

Another smart guy!

I told you you could just f... fuck off!


A final warning. Then to the bathhouse already.

Reason: