New with algorithm need help

I have an Oanda account and use 2 % leverage .  Manually open Limit orders every weekend to Buy/Sell  if they reach a rate distanced around 1% from last week Mid rate , Mt-1= (Lt-1+t-1)/2 . Basically I sell if spot  rates are above a long term regression line (indexed) and buy otherwise.  Usually I use -2% Stop Loss and around 0.6% Take profit . Is there anyway I can do that only one ( making appropiate algoritm )time and let it go  . Thank you for your advise, 



Update Backtest

Hi Gian,


Your question is not very clear. I would say: from the top menu items go to Algorithm Lab, then from the left panel click on University and watch the videos. Those will give you a very good idea about how an algorithm is set up in QC and how to write your own.


Good luck.


Hi Gianluigi,

I made a simple algorithm for you based on your description. I'm not sure I fully understood your idea but the point here is to show you how it works. As Patrick said, it would be benificial to go through thoses tutorials and vedeos first. You can also ask here if you have any further question. 


Tank you guys , definetly have to go thru thoses University courses , thanks again

talk to u soon


Update Backtest


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.


This discussion is closed