How to maximise MFE?


i would like to optimize my algo in order of maximize the profit when trades are in my favor.

My algo works this way:

  • for each trade, I define bracket orders, so I have a limit order with the profit target price and stop loss order prices based on volatility.
  • The trades management works with bumping order prices up/down as market goes in my favor: 
    • stop loss prices getting bumped by 1.001 once it reaches the threshold level of 1.5%
    • stop loss prices set at minimum entry price * 1.001 once trade profit reaches 5% of portfolio
    • limit orders prices are bumped when prices gets close to the initial take profit price
Below some example of trades, as you can see for many of the trades a lot of profit has been given away, only a few trades the profit was optimized.

Your ideas are welcome. I'm willing to share the algo with those that want to collaborate, but the code is now quite complex. I use Oanda as broker.


Symbol $type"QuantConnect.Symbol, QuantConnect.Common"Value"XAGAUD"ID"XAGAUD 8I"Permtick"XAGAUD"EntryTime"2017-12-13T16:00:00Z"EntryPrice20.72Direction0Quantity9522ExitTime"2017-12-13T19:17:00Z"ExitPrice21.05319ProfitLoss2419.4TotalFees0MAE-131.61MFE2668.07Duration"03:17:00"EndTradeDrawdown-248.67


Symbol $type"QuantConnect.Symbol, QuantConnect.Common"Value"BCOUSD"ID"BCOUSD 8I"Permtick"BCOUSD"EntryTime"2017-12-14T15:00:00Z"EntryPrice62.832Direction0Quantity3121ExitTime"2017-12-14T16:01:00Z"ExitPrice62.861ProfitLoss90.51TotalFees0MAE-305.86MFE1391.97Duration"01:01:00"EndTradeDrawdown-1301.46


Symbol $type"QuantConnect.Symbol, QuantConnect.Common"Value"EURCHF"ID"EURCHF 8G"Permtick"EURCHF"EntryTime"2018-01-18T12:00:00Z"EntryPrice1.17531Direction0Quantity271199ExitTime"2018-01-18T15:19:00Z"ExitPrice1.17414ProfitLoss-331.13TotalFees0MAE-331.13MFE118.87Duration"03:19:00"EndTradeDrawdown-450 Symbol $type"QuantConnect.Symbol, QuantConnect.Common"Value"JP225USD"ID"JP225USD 8I"Permtick"JP225USD"EntryTime"2018-01-18T07:00:00Z"EntryPrice23791.6Direction0Quantity11ExitTime"2018-01-19T15:04:00Z"ExitPrice23811.9ProfitLoss223.3TotalFees0MAE-823.9MFE1240.8Duration"1.08:04:00"EndTradeDrawdown-1017.5   Symbol $type"QuantConnect.Symbol, QuantConnect.Common"Value"JP225USD"ID"JP225USD 8I"Permtick"JP225USD"EntryTime"2018-02-02T03:00:00Z"EntryPrice23232.3Direction0Quantity21ExitTime"2018-02-02T05:46:00Z"ExitPrice23255.5ProfitLoss487.2TotalFees0MAE-1207.5MFE2360.4Duration"02:46:00"EndTradeDrawdown-1873.2 Symbol $type"QuantConnect.Symbol, QuantConnect.Common"Value"XAUSGD"ID"XAUSGD 8I"Permtick"XAUSGD"EntryTime"2017-12-14T18:00:00Z"EntryPrice1689.136Direction0Quantity153ExitTime"2017-12-15T14:56:00Z"ExitPrice1690.825ProfitLoss191.8TotalFees0MAE-404.2MFE1116.49Duration"20:56:00"EndTradeDrawdown-924.69
Update Backtest

Hi, I am working on Andreas Clenow's ideas. He basically states you never know if the market goes up or down. He uses trend following or momentum. When the price is against you, he uses the ATR to see how volatily and risk you accept to step out, if not, to stay in, but rebalance your portfolio so you have equal risk over the securities. I am up to working on the ATR position sizing. If you have a nice trading idea based on some background of a trader or with real live trading background , you can count me in to help. I am not into trading bitcoins, but more into futures.


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