Hi, first of all I would like to thank you for this amazing service! I really appreciate it and I'm very happy to have discovered this service.

Now to the problem ...

I came from the MT4 trading platform, where the situation was quite trivial. Thus, the backtest ran classically in time (from beginning to end) and the entire source code was executed (readed) once every time the price (tick) changed. Within the Event Handling Function - void OnTick().

Here, however, the situation is different, as I understand it. Can someone please explain it to me briefly.

In initialization, I set the data type, for example minute:

var aapl = AddEquity ("AAPL", Resolution.Minute);

Then comes the OnData event... However, it does not behave like OnTick(). What exactly is the difference?

For example, if I have it set up like this:

public override void OnData (Slice data)

How often will the code be executed in the backtest?

Or better yet, what exactly does this piece of code do? I don't really understand that OnData.

 

And the last question. How do I do the following ... so for every day, for a specific minute, some command will be executed (only once). For example, every trading day 10 minutes before the AAPL market closes, write something in the log ...

Thank you

Author