Hi all,

I'm pretty new here. I haven't had any issues with setting up algos so far, but a couple things about crypto are throwing me off.

I looked at this example of a buy for BTCUSD:
https://www.quantconnect.com/forum/discussion/2747/crypto-trading-on-quantconnect

It uses SetHoldings, but I believe I read somewhere in the documentation that SetHoldings() would crash a live algo on GDAX.
Is that true or is the above algo OK?


On the same note,
I read that Liquidate() has some issues with crypto because of virtual positions. Is that true/what's the preferred method?

 

With the aforementioned things in mind, can someone help me set up a simple algo in C# with:
A market order that buys BTCUSD using 50% of available/free cash (Not portfolio value--just cash that isn't in assets already--not sure what the variable for this is)

And a week after purchasing:
An order to sell 50% of bought BTCUSD (note: not necessarily the same amount that was bought)..

An attached backtest with the aforementioned code would be awesome, and give me a lot of insight into how QC functions, particularly in regards with crypto and C#!

 

Thanks!
Steven H.