I'm trading Crypto
I've been search for this for most of the day now, and I'm not finding a clear example.
Is there a way to set the fee to be based on the order amount in USD.
I see how to set a specific amount, but Gdax charges .0025 USD per transaction. So I need it to change per transaction, and not always be set to 4 cents.
Securities[ticker].FeeModel = new ConstantFeeTransactionModel(0.04m);
string tickersString ="BTCUSD,ETHUSD,LTCUSD";
public override void Initialize()
{
SetStartDate(2018, 1, 1);
SetEndDate(2018, 1, 25);
SetCash(10000);
string[] tickers = tickersString.Split(new string[1] { "," }, StringSplitOptions.RemoveEmptyEntries);
foreach (string ticker in tickers)
{
Symbol symbol = QuantConnect.Symbol.Create(ticker, SecurityType.Crypto, Market.GDAX);
AddCrypto(symbol, resolution);
Securities[ticker].FeeModel = new ConstantFeeTransactionModel(0.04m);
StockData stockData=new StockData();
stockData.Ticker=ticker;
stockData.emaOfChanges1Indicator = new ExponentialMovingAverage(emaOfChanges1Length);
stockData.emaOfChanges2Indicator = new ExponentialMovingAverage(emaOfChanges2Length);
stockDatas.Add(stockData);
}
}
John Schwartz
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.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!