Hi there,

First of all this site is great it even gave me an aspiration to learn a new language.

In this case it`s a coding language if ya havent guessed that part yet :P

Must say for a total newb it is hard learning a complete new dictoinairy and trying to make sense of it all.

Could someone help me with my project? 

 

I hope that if some one can help me with the first part it wil help me get new insights on how to code while I study the New language some more.

using QuantConnect.Indicators; namespace QuantConnect.Algorithm.CSharp { /// <summary> /// </summary> public class TestFileWaveRider : QCAlgorithm { //Main part of strategy private BollingerBands UpperBand, LowerBand, MiddleBand; private CandlestickPatterns Red, Green; //How to set;(lower_BB, Upper_BB, Average_BB??); // How to set //(symbol, Period, k, movingAverageType = 0, resolution = null, selector = null); /// <summary> /// Initialize the data and resolution you require for your strategy /// </summary> public override void Initialize() { //if this is to get the price second is better than minute. AddCrypto(Ticker, Resolution.Minute, "BTC/USDT", fillDataForward, leverage) //set leverage decimal leverage = 1m, //set portfolio //set start date for backtest. SetStartDate(2018, 1, 1); SetEndDate(2019, 1, 25); SetCash(5000); // Define the symbol and "type" of our generic data??? AddData<BinanceBrokerageModel>(UpperBand, Resolution.Hour); AddData<BinanceBrokerageModel>(LowerBand, Resolution.Hour); addData<BinanceBrokerageModel>(MiddleBand, Resolution.Hour); AddData<BinanceBrokerageModel>(UpperBand, Resolution.Minute); AddData<BinanceBrokerageModel>(LowerBand, Resolution.Minute); addData<BinanceBrokerageModel>(MiddleBand, Resolution.Minute); // Set up default Indicators??? UpperHour = BB(UpperBand.Hour, 1); LowerHour = BB(LowerBand.Hour, 1); MiddleHour = BB(MiddleBand.Hour, 1); UpperMinute = BB(UpperBand.Minute, 1); LowerMinute = BB(LowerBand.Minute, 1); MiddleMinute = BB(MiddleBand.Minute 1); } /// <summary> /// Custom data event handler: /// </summary> public void SetTradesForSmallWaves { // Count open posistions int OpenPosistions = 0 // The higher the equity the higher the Cash should be set. Use as treshhold never loose more then set. // Open posistions should be balanced to match portfolio total. if (Cash => 2500 && OpenPosistions =< 10 ) {//Catch Downfall Numbers need tweaking!!! switch; case 1: (((LowerHour => ActualPrice || (LowerHour * 1.01 => ActualPrice)) && Current.CandleStick == Red) Portfolio.Sellorder($50, at ActualPrice + 0.0115); //Day Order OpenPosistions =+ 1; if (Current.CandleStick == Red) { Hold.OpenPosistion } if (Current.CandleStick == Green && (StartPrice.Current.CandleStick * 1.025) => StartPrice.OpenPosistion { Close.Posistion; OpenPosistion =- 1; } if (Current.CandleStick == Green && OpenPosistion =< ActualPrice || (OpenPosistion => (ActualPrice * 1.25) { Close.Posistion; OpenPosistion =- 1; } if (Current.CandleStick && Previous.CandleStick == Green) && ((Current.CandleStick.price + Previous.CandleStick.Price / 2) * 1.025) => CurrentPrice Close.Posistion; OpenPosistion =- 1; } {// Ill come up with more cases when I get the first part running. switch; case 2: (() && () } { switch; case 3; } { switch; case 4; } } } public class { public } }

Author