Algo trading Fx

About me: I’m a computer programmer and about a year ago stumbled on Forex trading. Being a programmer started to look for any API available for FX trading and guess what, found Oanda API.
I started coding against Oanda API about 8 months ago. About 6 months ago started using my program in Demo account. Seeing it worked started developing few strategies and traded in Demo.

Today I placed my first live trade with $200 using my code. I have used simple candle stick pattern to determine setup and trade with single pair EUR/USD. Strategy works on 4hour.

I’ll post my progress every week here. I’m excited!

1 Like

I love experiences such as these. Wish you make a killing!

Looking forward to your updates. Let us know if you need help.

Great, I am waiting for your updates how you strtegy and system work?

My strategy analyzes four 4 hours candles and trade on 5th candle. Trade lifetime is 4 hours, either it hit profit or close at the end of the candle. This strategy was back tested on 3 years of data and was able to convert $200 to $1600. Im not expecting the same results in live but I expect at least 20% of $200. Will see…

Week #1

Total trades: 8 Winners: 5 Losers: 3
Start balance: $200 End balance: $223.59
PL: $23.59 (12%)

Based on my back test I have tweaked my code for next week and onwards…

  • Added 50 pips stop loss. My back-test results showed that uncertainty can’t be avoided, and I incur huge loss without stop loss. After putting 50 pips stop, results improved significantly.
  • Added one more candle in my strategy. Now instead of 4 candles, 5 candles are considered while analyzing setup.
  • Closing trade before 5 pm to avoid any finance fee. Oanda charge a fee if you keep trade for a day. For this small account that hurts.

Please let me know if you guys have any suggestion, question or anything that can improve my trading.

See you all next week…Happy trading!



Had a 10% drawdown in the beginning of the week. Nearly recovered by the end of the week.

Total trades:12 Winners:8 Losers:4
Start balance: $223.59 End balance: $221.56
PL: $-2.03 (-0.9%)

Till Date:

Start balance: $200 End balance: $221.56
PL: $21.56 (10.78%)
PL ratio:0.81
Winning trades: 65%
Losing trades: 35%

I just started to use the Oanda API too. There were no REST wrappers for Delphi, so I wrote those first… Now Im using MT4 to generate my signals (Because MT4 has the built in indicators) and let My app that I wrote deal with the orders. Going to move the whole thing over to Oanda API eventually…

Pipmonkey- Good to know! My algo do calculations based on open, high, low and close but API was not returning the correct open and I had to face 10% loss. When I contacted their customer service came to know that there is a parameter ‘smooth’ to get last candle close as open for new candle. Did that and was able to recover from losses.
My Algo runs on cloud 24/7 except market close. There is no manual interaction whatsoever. I have never done forex manual trading so I have no idea of MT4 or any other manual trading tool.

It’s great to see the way your strategy has worked for you. Keep on sharing your strategies, it would be of great help.


My Algo doesn’t trade on US, EUR & GBP holidays hence this week was short. Algo has produced better results than expected in 3 weeks. I’m waiting for the losing week to see how much low it can go. As per my 15 years of back test data the average drawdown is 35%. Max drawdown 81% in 2008 (market crash year).

Total trades: 7 Winners: 5 Losers: 2
Start balance: $221.56 End balance: $257.04
PL: 35.48 (16.01%)

Till Date:

Start balance: $200 End balance: $257.04
PL: 57.05 (28.52%)
PL ratio:0.93
Winning trades: 67%
Losing trades: 33%