Backtesting Forex pairs -help'

Questions about MultiCharts and user contributed studies.
miracleworkertrading
Posts: 13
Joined: 22 Sep 2009
Location: NYC
Has thanked: 6 times

Backtesting Forex pairs -help'

Postby miracleworkertrading » 23 Jan 2015

Hi,
I am trying to learn how to ACCURATELY backtest some strategies on Forex daily charts. I have looked at the the MC users guide and really got nowhere. It showed a lot of stuff to be had from a button in the upper left corner of the performance report. None of that is available in my forex pairs reports

I am trying to get some real results and equity curves for applying one strat to one symbol. It is very confusing? The property settings are a mystery to me. I am not new to Easy Language, but new to backtesting. Can someone point me in the right direction for a tutorial in how to set trade size, margin, etc so I can get some meaningful results? When I set up a strat on a chart with the defaults, I go through several hundred trades with a gross profit of something like $1.43, gross loss of $0.93 and a net profit of $0.50, and a nicely moving upward equity line, going from $100,000 to maybe $102,000 over many years. Not useful obviously. Some help in setting parameters to reflect my true win/loss over a mini or full lot would be awesome. Something like $1.00 per tick for $10,000 mini or $10.00 per full lot is what I'd expect, win or lose. Either explain or point me is great. The users manual is useless in the regard (no disrespect intended). Thx! Scotty

hughesfleming
Posts: 275
Joined: 22 Apr 2014
Has thanked: 70 times
Been thanked: 72 times

Re: Backtesting Forex pairs -help'

Postby hughesfleming » 24 Jan 2015

Hi Scotty,

When you select your strategy properties you need to adjust the number of fixed shares/contracts. In my case with LMax that means a full lot is 100. You then need to click "Manage Rules" and enter any commission that your broker is charging you per minimum position size and make sure that it is multiplied correctly by your actual trading position size. Finally account for slippage where I usually enter the average spread per round trip.

One important thing to remember is on your autotrading tab make sure that you set the correct broker plugin. It can happen that you are charting and testing on demo but your broker plugin is set for your live account. Just make sure that your charts and autotrading broker plugins are setup for the same accounts or you could be in for a surprise. You might want to forward test your strategy but just be careful not to execute trades on your live account by mistake.

I am sure there is something I have missed that someone more experienced than myself would be happy to add but the above settings get a result that is close enough for my testing purposes.

regards,

Alex

miracleworkertrading
Posts: 13
Joined: 22 Sep 2009
Location: NYC
Has thanked: 6 times

Re: Backtesting Forex pairs -help'

Postby miracleworkertrading » 25 Jan 2015

Thanks Alex!
I think I'm off to a start now. I am using IQFeed data strictly for development right now, and am not tied to a broker, so I don't think that the autotrading tab is relevant right now. Honestly, I am on a 3 month lease with MC to see whether I want to abandon TS, close my account, and use MC with someone else. I've been with TS really only because EL is the only language I can program to some extent. MC seems more responsive to user requests than TS, which is important to me. TS is the only serious platform I know of which still doesn't have a Market Replay function, after it being a forum high priority request for a tedious ten years. It's enough to make me jump ship. Really pisses me off, truthfully.

Anyhow, I put the simplest one way MA crossover strategy together and ran it, looking at the profit generated on specific trades and they are now making sense. I find that one EURUSD contract with IQFeed and no broker plug-in gives $1 profit/loss per pip. Thus, one fixed contracts/shares in Strategy Properties = one mini-contract ($10,000), so a full lot means I need to put 10 fixed shares/contracts to replicate one full ($100,000) lot in testing.

One thing that is confusing me is the commission and slippage. I created an "FX 4 pip" commission rule which specified 0.0004 cash per contract, and 0.0004 slippage. I was charged 0.0016 trade cost on a one contract trade, instead of 0.0008. Changed it to cash per contract instead of cash per trade, same result. So in order to have a total trade cost of 0.0008 (4 pips commission, 4 pips slippage) I had to set both commissions and slippage to 0.0002 . That was with one contract. I changed it to 2 fixed shares and I still had to cut the costs in half to have them reflect properly in the list of trades. But with 2 fixed shares, going between cost per trade vs. per contract, the cost doubled when charged per contract which makes sense. But I still had to keep the initial settings at 0.0002 for some reason.

Thanks for the kick start with the backtesting interface. Much appreciated.

Scotty

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Backtesting Forex pairs -help'

Postby Henry MultiСharts » 30 Jan 2015

Hello Scotty,

When you do backtesting the "lot size" is the Big Point Value of the instrument. Please see the description at the following page: Settings Instrument Properties.

Min.Movement * Price Scale is the price of 1 tick in chart price.
Min.Movement * Price Scale * Big Point Value is the price of 1 tick in the secondary currency of the Forex pair.

Please refer to our Wiki session to learn more regarding the Commission Rules.


Return to “MultiCharts”