Back

Template for fxcm request

As a beginner in c# I would very much appreciate if someone could post a simple template (e.g.: ema crossover) which is all set up to be used with a fxcm (test) account (cfds and forex).

Thanks in advance!

 

Update Backtest








When the algorithm trades securities that are supported by the brokerage, we do not need a special setup. We can run the same algorithm for FXCM and Oanda.

However, we want to run backtests that emulate a particular brokerage, we can set it up (please check out the docs under Reality Modelling section):

// In Initialize method
// Set brokerage model using helper methods:
SetBrokerageModel(BrokerageName.FxcmBrokerage); // Defaults to margin account
SetBrokerageModel(BrokerageName.TradierBrokerage, AccountType.Cash); //Or override account type

// Supported brokerage names:
BrokerageName.FxcmBrokerage
.OandaBrokerage
.TradierBrokerage
.InteractiveBrokersBrokerage

 

1

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.


thanks Alexandre,

so when I run abacktest I need to set

SetBrokerageModel(BrokerageName.FxcmBrokerage);

but when I want to go "live" on a test or real account I wouldnt need to set anything, right?

best,

Andreas.

0

Right. On live mode, some of the settings we made on Initialize are discarded, SetBrokerageModel is one of those.

1

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