Back

Visual Studio step by step for C#

Dear colleagues,

Invite all of you to share your experience ranging from early beginning to master levels to build a comprehensive guide for strategies development using Visual Studio C#.

Update Backtest








My (coding) workflow basically is:

  • Clone Lean Git repo
  • Do most work on a single branch (working alone, I find more is rarely needed.. I do try structure commits though)
  • To run, backtests or live servers I copy paste code to web IDE
  • It follows that I try to keep each algo in its own single source file when possible with private inner classes. If it gets larger than > 1000 lines I use partial keyword to split it up (but it complicates copy pasting)
  • For some other cases where I need to do stuff that can't be done in web IDE and I can download the data (e.g. from Oanda), I run Lean locally "like it was intended"
0

And yeah, I'm still looking at better ways to do research because the above only covers implementing an idea you know already works (it's kind of inefficient for doing stuff that doesn't work in the end). Hence I will probably go into the trouble of learning the research environment in Python provided here.

0

Have you seen the VS plugin Petter? It should skip the copy paste step
0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


I evaluated it long ago but guess a lot has changed since then. I'll take a fresh look in that case!

0

Newcomer for LEAN under VS17 would appreciate the step-by-step instruction to run C# strategy in the VS environment.

0

How to export QC code from main.cs to VS project?

0

James,

I copy and paste from online to VS project Algorithm.Cssharp. Often, Lean requires adding other references "using"

Maybe there are better ways to do that

0

How to create and save graphs of the backtested strategies in VS using LEAN engine?

0

Hello,

running LEAN engine in VS gives only the strategy backtest data but not a chart. How to get the chart using QC strategies' library?

0

To Jared,

I'm at Prime. How to get using the VS coding and what are the benefits?

0

Colleagues,

When running backtest with VS2017, it stops and tells "System.ComponentModel.Win32Exception:'The system cannot find the file specified' on the line "if (VersionHelper.IsNotEqualVersion(job.Version) || job.Redelivered) of the Program.cs.

Thus, I can't go thurther this point. Any idea how to fix it?


 

0

James Lehman  - 

For open source issues please use the Google Groups to help the most people.

https://groups.google.com/forum/#!forum/lean-engine

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed