IG Index Backtest

croker

Junior member
Messages
42
Likes
0
Hi, I'm trying to use the Backtest software in the IG Index platform but running into some difficulties. Maybe someone can help.

Basically I have written some simple backtests and when i run them they only trigger once instead of, say, 3 times.
A simple example would be the 5EMA crossing the 10EMA:

c1 = ExponentialAverage[5](close) CROSSES OVER ExponentialAverage[10](close)

IF c1 THEN
BUY 10 SHARES AT MARKET
ENDIF

I try and run the backtest on the daily chart.

The only manual i found have precious little information in it.
Any ideas?
 
Hi guys

fibonelli is correct. You need to define your sell for each buy. The easiest way to do this is to use the stops/take profits in the money managment section.

Let me now how you get on.
 
Thanks guys.I defined the sell conditions and now it triggers more than once.

But if i understand it correctly, this means it will only implement another BUY order if the SELL order has triggered for the previous BUY??

For example if i set a STOP somewhere really low that will never be triggered, it only triggers the one BUY order again.
Is it possible for it to trigger a BUY order every time the condition is triggered without the STOP being triggered?
Hope that makes sense..
 
I noticed that you also need to watch the drawdown of your backtested strategy as the test may stop "trading" because the "account" has gone to zero and so you are not getting the full number of possible trades over the time period. This is something to watch out for and to be solved via either changing the trading rules [entry, exit, stop] or looking at how the money management is executed [capital allocation per trade].
 
Thanks rnl16616 as well.
I will look into it further.

In the meantime if anyone has this working could they give an example, including backtest code and what settings to put into the money management. It would be a good reference.
 
is there anywere were you can get codes for the back test for ig or does anyone know how to get it to like buy on trend lines in the back tests and stuff like that if it makes sence?
 
is there anywere were you can get codes for the back test for ig or does anyone know how to get it to like buy on trend lines in the back tests and stuff like that if it makes sence?

I'm not sure if that's possible straight 'out-of-the-box' so to speak, although it may be if you are able to program S/R lines in as indicators. You could then use these 'indicators' as part of the backtesting code.

By the way, if you aren't interesting in back testing, IG now lets you draw on lines that act as signals for trades.
 
is there anywere were you can get codes for the back test for ig or does anyone know how to get it to like buy on trend lines in the back tests and stuff like that if it makes sence?

Hudz, it may be quite hard to code your own Support and Resistance but, you can use an approximation such as Donchian Channels. The code for them can be found here:

ProRealTime.com

Go to indicators and scroll down to the public ones.
 
Could someone tell me where this backtest facility is located on IG. Is it somewhere in the advanced charts section?
 
Top