Back

Python and Forex

Hey all, 

I'm new to this system, and still trying to get my bearings from the documentation and the python examples. There does not seem to be any examples for forex trading with python, all of them appear to use stocks. This shouldn't be a problem as its just a different type of equity, but I keep running into problems getting 'simple' scripts to run. Anyway, I attempted to mod the MACD stock example code as a test case, but it has backtest issues. 

Any advice/insight/guidance would be greatly appreciated. (I attached the backtest, but because it wont run the only merit is being able to see the code) {Still a really cool feature though}

 

Update Backtest








bump.
I also would be highly interested in getting an example on how to trade on fxcm with python code. just anyold "hello world" ma cross would do just fine.
0

self.AddSecurity(SecurityType.Forex, self.__Symbol)
should do the trick
1

@Andreas

Do you mind sharing your example by embedding your backtest? I haven't had the chance to try your solution?

 

0

I hope the attaching of the backtest works. I am very new here too.
anyway, I just took the code from github

just replaced "Equity" with "Forex" and ofcourse "EURUSD" instead of "SPY".

If you stumble across some good python documentation, I'd be thankfull, if you shared with me ;)

 

1


@Andreas Dekrout

At this point the best documentation, I have seen is the style guide. Which they are going to update. However, they are working on adding numpy and pandas support which will be amazing.

1

Thanks a ton for the specifics btw, (can't edit previous posts)

0

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