Hi Everyone. 

So I'm new to working on QC, and wanted to ask someone for help. My algorithm requires to check Open data for the past 5 days. How can I implement that in QC? 

I would like something along the lines of:

If two days ago the Open for EURUSD was higher than the Open three days ago  then buy EURUSD today (simplified version of what I need to do with the past data, but you should get the idea)

 

Secondly,

 

I have seen a fair amount of questions asked in regards to SL and TP. However, I was wondering how one can put both into an order at the same time? 

I haven't got any code written yet, as these two things are integral parts for me to start coding.

Regards

 

 

Author