Probacktest

Personally I always found their support a bit lacking - but I have a feeling if you speak French you would be ok, as I think there's an active community of developers etc in France who are on a forum somewhere. Only manual I ever had I downloaded (stright from their website rather then CMC) and I would guess it's the same one you had.

I never fully got to grips with the backtest functionality. Liked the charts though.

Good luck

GJ

Unfortunately I don't speak French. It's easy enough to translate using Altavista's Babelfish, but it's difficult to search for information by translating English into French, searching, then translating French into English. Well it just makes it that bit more difficult. I might yet have to go down that route, but maybe members of T2W can begin an english language support forum for probacktest here :idea:

I'll begin next post
 
Outside bar

I am modifying the code found here: ProRealTime.com -> strategies -> Outside bar.

I ran the code in probacktest on the DAX 1 hour and 2 hour charts with poor results, I tweaked the code a bit in a effort to understand it and had fabulous results.

It was trading on the bar after the outside bar, but could not hit stops or limits until it encountered another outsidebar.

all the code was contained in this IF block:
IF High > High[1] AND Low < Low[1] THEN
..... entry code
..... exit code including stops
ENDIF

so you can see a trade could not be stopped until another outside bar was detected.
It is surprising that code posted on the prorealtime.com website is so flawed .. but then again their manual is poor aswell.

Anyway the solution is to break the code up into blocks, one block enters the trade, separate blocks exit the trades . I''m still working on it, gotta go out , I'll post code later,
 
finally I have some working code

My code for the outside bar, It produces horrible results in backtesting, but at the moment I am more interested in having code that works, in order to understand how it behaves in backtesting .. (I tested it on the DAX daily, 2Hour and 1Hour) .. I'll follow up later ... everything below this line can be copied and pasted into probacktest for anyone who is interested:
HTML:
REM -- Trade long/short on a close higher or lower than the high or the low of an outside bar.
REM -- Trades are closed when the trade makes +20 or loses -20 points whichever comes first. These numbers
REM -- are easy to change in the code at the end.. I realise this is not the conventional method for trading the
REM -- outside bar. Maybe that shows in the results ;) 
ONCE outsidebarinplay = 0 //1=true, 0=false
REM -- if we have no position
IF NOT ONMARKET THEN
    REM -- If the bar is an outside bar
    IF High> High[1] AND Low < Low[1]  THEN
        REM -- store the high and the low
        outsidebarhigh = HIGH
        outsidebarlow = LOW
        outsidebarinplay = 1 //1=true, 0=false
    ENDIF
    IF outsidebarinplay = 1 THEN
        IF Close > outsidebarhigh THEN
            BUY 1 SHARES AT MARKET REALTIME
        ENDIF
        IF Close  < outsidebarlow THEN
            SELLSHORT 1 SHARES AT MARKET  REALTIME
        ENDIF
    ENDIF
ENDIF
IF LONGONMARKET THEN
    IF OPEN > (outsidebarhigh + 20) THEN
        SELL 1 SHARES AT  MARKET REALTIME
        outsidebarinplay = 0
    ELSIF OPEN < (outsidebarhigh - 20) THEN
        SELL 1 SHARES AT  MARKET REALTIME
        outsidebarinplay = 0
    ENDIF
ENDIF
IF SHORTONMARKET THEN
    IF OPEN <  (outsidebarlow - 20) THEN
        EXITSHORT 1 SHARES AT MARKET REALTIME
        outsidebarinplay = 0
    ELSIF OPEN > (outsidebarlow + 20)  THEN
        EXITSHORT 1 SHARES AT MARKET  REALTIME
        outsidebarinplay = 0
    ENDIF
ENDIF
 
Last edited:
final (latest) incarnation of the outsidebar code:
I should warn that copying and pasting the code might result in wrapped lines of code or comments thereby causing an error when you try to run it .. so make sure the code you paste is formatted in the same way it is here (eg . watch out for comment lines wrapping to the next line .. comments not preceded by REM or // will result in an error)

Improvements in this version:
1 - trades and stops are now executed mid bar (realtime) as opposed to on bar close or open
2 - the criteria to enter a trade now requires that the outside bar has a higher high than the preceding 3 bars . and a lower low than the preceding 3 bars
3 - the limit sell on profitable trades occurs when the price has exceded the entry price by the height (spread) of the outside bar. this might seem arbitrary ..and it is:)
4 - the stops are set to trigger when the trade goes against us by half the spread (height) of the outside bar. this may also seem arbitrary, and you guessed correctly ,, it is.

If you have any ideas for entry and exit (ie the correct outside bar strategy) for this strategy let me know and I'll try to code it. You will find that the strategy I have coded here is predictably unimpressive in terms of profits.

HTML:
REM -- Trade long/short on a close higher or lower than the high or the low of an outside bar.
REM -- successful trades are closed at the spread (height) of the outside bar.
REM -- eg if the outside bar is 50 points high then the profit on a successful trade would be approx 50 points
REM -- the trade is stopped out if the price hits half the height of the outside bar in the wrong direction
REM -- so an outside bar with a 50 point spread would be stopped out at approx -25 points

ONCE outsidebarinplay = 0 //1=true, 0=false
REM -- if we have no position
IF NOT ONMARKET THEN
	REM -- If the bar is an outside bar (high is higher than the high of the last 3 bars, low is the opposite) 
	IF High+1> Highest[4] AND Low-1 < Lowest[4]  THEN
		REM -- store the high, the low and the spread of the outside bar
		outsidebarhigh = HIGH
		outsidebarlow = LOW
		outsidebarspread = outsidebarhigh-outsidebarlow
		outsidebarinplay = 1 //1=true, 0=false
	ENDIF
	IF outsidebarinplay = 1 THEN
		IF HIGH > outsidebarhigh THEN
			BUY 1 SHARES AT outsidebarhigh STOP  REALTIME
		ENDIF
		IF LOW  < outsidebarlow THEN
			SELLSHORT 1 SHARES AT outsidebarlow STOP  REALTIME
		ENDIF
	ENDIF
ENDIF
IF LONGONMARKET THEN
	IF HIGH > (outsidebarhigh + outsidebarspread) THEN
		SELL 1 SHARES AT  (outsidebarhigh + outsidebarspread) LIMIT REALTIME //profit
		outsidebarinplay = 0
	ELSIF LOW < (outsidebarhigh - outsidebarspread) THEN
		SELL 1 SHARES AT (outsidebarhigh - (outsidebarspread/2)) STOP  REALTIME //loss
		outsidebarinplay = 0
	ENDIF
ENDIF
IF SHORTONMARKET THEN
	IF LOW <  (outsidebarlow - outsidebarspread) THEN
		EXITSHORT 1 SHARES AT (outsidebarlow - outsidebarspread) LIMIT  REALTIME //profit
		outsidebarinplay = 0
	ELSIF HIGH > (outsidebarlow + outsidebarspread) THEN
		EXITSHORT 1 SHARES AT (outsidebarlow + (outsidebarspread/2)) STOP  REALTIME //loss
		outsidebarinplay = 0
	ENDIF
ENDIF
 
Last edited:
Hi All,

I found ProRealtime to be an excellent piece of software especially considering that its free!!!

However, one criticism is with the backtester. Although it is easy to use it only allows testing on one security at a time which although may be ok if you intend to trade single instruments such as an index but is pretty much useless if you want to trade a Portfolio of Stocks... unless of course you only intend to have one open position at any one time....

Just my 2cents...

Chorlton
 
on studying the trades triggered by the previous code I found an instance where the bar was not an outside bar.
This was caused by the outside bar detection code: IF High+1> Highest[4] AND Low-1 < Lowest[4] THEN

Highest[4] gave me the highest prices for 4 bars, but it included the outside bar . so the code IF HIGH > HIGHEST[3] resulted in no detection at all .. so I coded: IF High+1 to make sure outside bars could be detected again .. but this meant that one or two bars detected as outside bars were not outside bars ..

I have added to the code below so that the highs and lows of the previous three bars are stored before we try to detect an outside bar.


HTML:
REM -- Trade long/short on a close higher or lower than the high or the low of an outside bar.
REM -- successful trades are closed at the spread (height) of the outside bar.
REM -- eg if the outside bar is 50 points high then the profit on a successful trade would be approx 50 points
REM -- the trade is stopped out if the price hits half the height of the outside bar in the wrong direction
REM -- so an outside bar with a 50 point spread would be stopped out at approx -25 points

ONCE outsidebarinplay = 0 //1=true, 0=false
REM -- if we have no position
IF NOT ONMARKET THEN
	REM -- store the highs and lows of the previous three bars
	twobarhigh = MAX(HIGH[1], HIGH[2])
	twobarlow = MIN(LOW[1], LOW[2])
	threebarhigh = MAX(twobarhigh, HIGH[3])
	threebarlow = MIN(twobarlow, LOW[3])
	REM -- If the bar is an outside bar (high is higher than the high of the last 3 bars, low is the opposite)
	IF HIGH>threebarhigh AND LOW < threebarlow THEN
		REM -- store the high, the low and the spread of the outside bar
		outsidebarhigh = HIGH
		outsidebarlow = LOW
		outsidebarspread = outsidebarhigh-outsidebarlow
		outsidebarinplay = 1 //1=true, 0=false
	ENDIF
	IF outsidebarinplay = 1 THEN
		IF HIGH > outsidebarhigh THEN
			BUY 1 SHARES AT outsidebarhigh STOP  REALTIME
		ENDIF
		IF LOW  < outsidebarlow THEN
			SELLSHORT 1 SHARES AT outsidebarlow STOP  REALTIME
		ENDIF
	ENDIF
ENDIF
IF LONGONMARKET THEN
	IF HIGH > (outsidebarhigh + outsidebarspread) THEN
		SELL 1 SHARES AT  (outsidebarhigh + outsidebarspread) LIMIT REALTIME //profit
		outsidebarinplay = 0
	ELSIF LOW < (outsidebarhigh - outsidebarspread) THEN
		SELL 1 SHARES AT (outsidebarhigh - (outsidebarspread/2)) STOP  REALTIME //loss
		outsidebarinplay = 0
	ENDIF
ENDIF
IF SHORTONMARKET THEN
	IF LOW <  (outsidebarlow - outsidebarspread) THEN
		EXITSHORT 1 SHARES AT (outsidebarlow - outsidebarspread) LIMIT  REALTIME //profit
		outsidebarinplay = 0
	ELSIF HIGH > (outsidebarlow + outsidebarspread) THEN
		EXITSHORT 1 SHARES AT (outsidebarlow + (outsidebarspread/2)) STOP  REALTIME //loss
		outsidebarinplay = 0
	ENDIF
ENDIF
 
Hi All,

I found ProRealtime to be an excellent piece of software especially considering that its free!!!

However, one criticism is with the backtester. Although it is easy to use it only allows testing on one security at a time which although may be ok if you intend to trade single instruments such as an index but is pretty much useless if you want to trade a Portfolio of Stocks... unless of course you only intend to have one open position at any one time....

Just my 2cents...

Chorlton

Hi Chorlton, with CMC's Marketmaker software I could have as many charts open as I have room for, each one could have probacktest running, where I would receive a visual warning that a trade was imminent .. I have not tested it though ..

My intention is to test a number of strategies on a few instruments one at a time really.I need to study the outcomes closely so that no draw down is too deep. If I found a strategy that worked on several time frames and on different instruments I'd be delighted .. but I'm only at the start of my investigation.

cheers
Shortorlong
 
Hi Chorlton, with CMC's Marketmaker software I could have as many charts open as I have room for, each one could have probacktest running, where I would receive a visual warning that a trade was imminent .. I have not tested it though ..

My intention is to test a number of strategies on a few instruments one at a time really.I need to study the outcomes closely so that no draw down is too deep. If I found a strategy that worked on several time frames and on different instruments I'd be delighted .. but I'm only at the start of my investigation.

cheers
Shortorlong

Out of interest, what instruments are you going to trade? Indices or Stocks?
 
Hi there,

I have just found this topic here. Is anyone still playing around ProBacktest?

I started to use it and found it most useful and fairly easy to use. Playing around with some ideas with intraday CCI setups with some really promising result.

Using CMC and their platform, seems a good choice to go for Prorealtime charting tools.

As the backtest can run on your chart and you can see the trades realtime, maybe it is a good system to use it as an indicator when your setup is materialized on the chart instead manually checking all the criterias all the time...

At the moment i am not too sure it would really work, but seems a good idea for a short or maybe even a longer term manual trading strategy.

Shortlong, if you still around, would you give us an update how did you get on with your tests?

Anyone else, if you have experience with Probacktest, please share it.
 
Indices then Forex ..
I haven't looked at stocks for spread betting

Hi ShortorLong

How has your ProBacktest program building been getting along?

I'm building a mechanical system but am a little stuck on something. I'm trying to program a stoch related rule which trades only once after the stoch line rises above 75 and does not trade again until it falls below 75.

Does anyone have an idea of how to do this?

Thanks

bluewater18
 
Probacktest trade condition above price

Hi ShortorLong

How has your ProBacktest program building been getting along?

I'm building a mechanical system but am a little stuck on something. I'm trying to program a stoch related rule which trades only once after the stoch line rises above 75 and does not trade again until it falls below 75.

Does anyone have an idea of how to do this?

Thanks

bluewater18

Hi,

I think I may have an answer to your question bluewater:

You need to use the following code and add in another variable explaining your buy condition after c1, and another for your sell condition after c2.

REM Buy & sell conditional on price

indicator1 = close
c1 = (indicator1 > 75 )

IF c1 THEN
BUY 10 %CAPITAL AT MARKET
ENDIF


REM Sell

indicator2 = close
c2 = (indicator1 < 75)

IF c2 THEN
SELL AT MARKET
ENDIF


Hope this helps? / Pls rep me if it works. (click the star icon under my name.)

Will be spending the next few weeks looking at probacktest, and would welcome any advice, can speak a bit of french so might check out those forums too.

H
 
Last edited:
Hi,

I try to understand the logic in ProBackTest and wonder if anyone in this thread is still working with that system.

What i try to active is that a buy order is executed at a certain price, i.e when next daily bar goes above previous days bar high low including setting a fixed target price and SL programmatically.
The problem at the moment is that when the code works for target price it executes the incorrect SL level and visa versa.

If anyone is still active with this platform please let me know I can continue discuss and I will provide code etc.

I would also be interested to discuss this topic outside this forum maybe via Skype to have 1-1 experience sharing.

Thank you,
wc
 
Top