Algo trading Fx

Week#2

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%

2 Likes

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…

2 Likes

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.

1 Like

Week#3

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%

2 Likes

Week#4

What a tough week! 50 pips stop hit for the first time in 4 weeks. Lost in the beginning recovered in the middle then again lost. Still up 18%.

Total trades: 14 Winners: 5 Losers: 9
Start balance: $257.04 End balance: $237.77
PL: $-19.27(-7.50%)

Till Date:

Start balance: $200 End balance: $237.77
PL: $37.77 (18.89%)
Winning trades: 56%
Losing trades: 44%

1 Like

Week#5

What a week! Lots of records broken. 5 consecutive losses, 4 consecutive wins & then again 4 consecutive losses. 3 big losses finally brought my account in RED. Still holding up, as per back tests it will rebound. Will see…

Total trades: 13 Winners: 4 Losers: 9
Start balance: $237.77 End balance: $189.67
PL: $-48.10(-20.23%)

Till Date:

Start balance: $200 End balance: $189.67
PL: $-10.32(-5.16%)
Winning trades: 50%
Losing trades: 50%

2 Likes

Hi @s_kushwah, As has been demonstrated and finally admitted to by various Brokers over the last 5 years, you are trading against your Brokers (LP’s) Algorithm which is only using the InterBank Markets prices as a guide… Nothing more… (Example)

I develop Indicators, Bots (EA’s) Strategies and extensively backtest a lot of code as well. After a while you will start to see patterns in the market makers algorithms. They become more obvious and more deliberate the more strategies I backtest…

Now…can I predict the markets?.. Hell no… but I can detect when the algorithm is running in one direction or the other…ie: Someone designs a Bot that makes a fortune from the get go… and it works perfectly for a while… then suddenly it no longer generates a profit… it is broken as they say… all that has happened is price action has flipped it’s signalling (Negative /Positive).

You can test this with any moving average crossover… do some backtesting to optimise parameters such as Time Frames… Periods… MA Type… even OCHL source… (I use powerful optimising software that tests 1000’s of combinations of these parameters over a matter of hours)

So, you find a combination and it works perfectly, now you let the EA lose on a Demo (or Live) account for some real results. It starts generating profits for 2-3 days maybe even a week or two (TF dependant)… then without changing any settings… it begins to lose each and every trade… 90% of the time taking your banked profit amounts right back to zero… This anomaly can be found with virtually ALL Indicators… hence why most trading strategies will require multiple Indicators / conditions (or NO Indicators) to be somewhat successful.

How many have seen these results from one of their time tested strategies?

Read across 1000’s of pages of Forex literature and you will see this phenomenon discussed ad nauseam… It’s how price action is designed to work… stretched margins, fooled Indicators… Continual Stop Hits… all conspiring to confuse traders and destroy profitable strategies engaged in these markets.

Week#5… The above is what you are witnessing…

Edit… Adding a Bool switch to an EA (reverse logic)… and test it… it will surprise you…

3 Likes

Hello @trendswithbenefits, thank you for enlightening me!

Fortunately I don’t use any kind of indicators. My strategy works on candlestick pattern recognition. Calculations are highly dependent on OHLC. If the broker screws that then I’m done.
I was expecting results like week#5 based on my backtests.

2 Likes

Yup, this is what Ive always preached… Charts and indicators are worthless… The only thing backtesting does is stress test your idea. Gives you an idea. I run my numbers and stats for 3 weeks back, and the previous week. thats it. I use no indicators… Just stats, and try to trade a butt ton so I can even the odds. I really treat the market like a dangerous casino. I think trying to read charts is a great distraction from what is really happening behind he scenes .

2 Likes

Week#6

I was able to recover last week’s losses. Maybe recovered this time but who knows what will happen next. Will see…

My stop hit one time because of news (US unemployment). Take away, update algo not to take trade on major news events.

In addition, did few modifications in the Algo. 1) Send an email if error happens while taking a trade or closing a trade. It was there however I made it very specific now. 2) Don’t take a trade at 5pm EST. Spread is so high at this time.

Total trades: 11 Winners: 7 Losers: 4
Start balance: $189.67 End balance: $217.43
PL: $27.76(14.64%)

Till Date:

Start balance: $200 End balance: $217.43
PL: $17.44(8.72%)
Winning trades: 52%
Losing trades: 48%

1 Like

Week#7

South Florida is expecting a hurricane this weekend. However, I have already experienced it this week. At one time my account was up 25% and by the end of week it is now in negative. In addition, my close order failed and I’m still in trade.

Changes in Algo…

  1. Circuit breaker: Now there is a daily and weekly loss limit. Once daily hit, no more trading for the day. However it will resume at 5:00pm EST. Same with weekly. Once weekly hits, no more trading for a week. It will resume at 5:00pm EST on Sunday.
  2. Reduce the position size for short trades. Stats are telling me that I’m losing most on short trades.

Onada now has a trading performance dashboard. Below are the numbers from that…

This week:

Till Date:

1 Like

Journey so far…

Greetings, very interesting post. I love Algo trading. How are you evaluating your strategies before putting them ‘online’.

I do a back test and demo test before going live. Oanda provides 15 years of historical data (from 2005). I back tested my strategy on 15 years of data and after seeing its resilience decided to go live with that.

1 Like

Week#8

Daily circuit breaker hit the first day of its implementation. It may be a long journey of recovery here as I’m very near to my weekly threshold. Will see…

Algo changes:

  1. Partial close position when profit/loss reaches 30 pips.
  2. If account balance is negative, reduce lot size. “Let Algo recover at its own pace”
  3. Trailing Stop once pips are more than 60

This week

Till Date:

Week#9

Third consecutive down week! Nothing recovered this week. However, I lost almost nothing. So that’s an improvement!

Based on some real time analysis provided by Oanda I have modified Algo…

  1. Timing edges analysis showed me that my strategy is making money when trade is taken between 1 and 5 am EST. Now Algo will only take trade between these timing.
  2. If profit hit 30 pips, close partial trade and move stop loss to breakeven.

This Week:

Till Date:

Week#10

Still down! However the good thing is my Algo is handling risk management pretty nicely. As I’m nearly 20% down from my initial investment, Algo is adjusting position size accordingly.

Here is what I have implemented as Risk Management…

  1. If the account is negative between 1 & 10%, reduce position size by 10%.
  2. If the account is negative between 10 & 15%, reduce position size by 50%.
  3. If the account is negative between 15 & 20%, reduce position size by 75%
  4. And if down more than 20%, then reduce position size by 80%
  5. Similarly when the account is positive and drawdown is between 10 and 20%, reduce position size by 25%.
  6. When drawdown is between 20 and 30%, reduce position size by 50%.
  7. When drawdown is more than 30%, reduce position size by 75%. Don’t lose the hard earned money!
  8. Of course other than above risk management techniques, I have daily and weekly circuit breakers in place.

At one point my account was up by 40% however without these risk management techniques I lost all my profit and now 20% down. Well lesson learned and now in recovery mode.

This week:

Till Date:

Journey so far:

Week#11

Seems I’m recovering! After putting all the position sizing risk management, I’m expecting slow recovery based on the back test. Will see…

This Week:

Till Date:

Journey so far:

Week#12

Algo didn’t identify any setup today. It’s done for this week. So posting my journal in the morning. Monday is a bank holiday in the US so there won’t be any trade.

3 months of live trading now. Recovery seems to be flat at present. I’m hanging in there.

I got some extra money through my credit card rewards program. The first thing that came to my mind was to add funds and one more pair AUDNZD that I have been back testing.Will see how it goes with all these risk management in place. Will keep posted here.

This Week:

Till Date:

Journey so far: