Hello,

I am a Forex trader and a professional software engineer.

Although I have barebones statistical and financial knowledge I have found quantconnect to be a great resource to learn.

 

I am practicing by writing my own algorithm, there is lots wrong with it but I'll learn by debugging it. For now, I am trying to compare the current price of a currency to a previous close. Trying to find the syntax I found these two variables:

data[self.symbol].Price

self.Securities['EURUSD'].Close

But what does the latter refer to, the previous close price the last time onData was called?

(Also, the docs don't mention this but when is onData called, or when and why is data received?)

Thank you