in Search

MS System Tester

Last post 02-08-2005, 15:47 by elmagd2000. 7 replies.
Sort Posts: Previous Next
  •  10-28-2004, 9:01 120

    MS System Tester

    Hello all,

    System tester is considered a very powerful tool when you get its rules and tricks. It saves enormous time for manual testing.

    May you share your experience with systems tester, how do you use it? how do you think Equis would enhance it?

    finally,
    Interested to share with me your ideas about:
    How To Backtest A System That Works With Marketorder, in other words, if cond. A and cond. B are on buy or sell now and not to wait for the next bar. I noticed that in system backtest if you use delay=0 ( buy or sell at same bar ) that position is opened at bar open which is not true.
    What are your ideas?
    Thanks
    Hani :)
  •  02-07-2005, 10:06 413 in reply to 120

    Re: MS System Tester

    Hello Patrick,
    Interested to share your ideas about market order in systems tester.
    Thanks in advance.
    Hani :)
  •  02-07-2005, 16:39 417 in reply to 120

    Re: MS System Tester

    Sorry I did not give this much though.
    If understand properly, you want to buy as soon as the signal is generated ... Right? :)

    The easy way and I'm sure you have done this, is to set a delay of zero and use the close value. So you would buy at the close of the bar that generated the signal.

    Now I don't know of any way to get the exact price value at the time the signal, and I doubt it is even possible. But depending on your buy formula we could maybe find a workaround.
    My Site
  •  02-07-2005, 18:22 421 in reply to 120

    Re:

    "Patrick":
    Sorry I did not give this much though.
    If understand properly, you want to buy as soon as the signal is generated ... Right? :)


    This is right.

    "Patrick":
    The easy way and I'm sure you have done this, is to set a delay of zero and use the close value. So you would buy at the close of the bar that generated the signal.


    I 've done that. How to set these settings in point only test? I noticed that "point only test" give better results specially in markets like forex.

    "Patrick":
    Now I don't know of any way to get the exact price value at the time the signal, and I doubt it is even possible. But depending on your buy formula we could maybe find a workaround.


    My buy formula is :

    Cross(H,Ref(HHV(H,20),-1))

    I need to buy as soon as I get Buy signal

    Thanks
    Hani :)
  •  02-07-2005, 19:33 423 in reply to 120

    Re: Re:

    if we stop thinking about buying at a specific time but rather at a specific value then we have solution to this.
    If you want to buy as soon as the price is greater than a variable X
    That means you want your entry price to be a tiny bit above X.
    ( Of course that would only work in real time and if your broker applies these buy and sell conditions for you ... blah blah :) )
    Now I don't think this could done in a system tester, but it can be done in an exploration, a bit like the PS performance explorations...

    Using your formula and creating a copy of a points only system test
    (Using close and zero delay) we would have the following for an exploration :

    ( I'm assuming here that your exit signal is the opposite of the entry signal formula )

    ColumnA
    Name :Long Profit
    Formula :

    BC:=Cross(H,Ref(HHV(H,20),-1)) ;
    SC:=Cross(Ref(LLV(L,20),-1),L);
    State:=If(BC,1,If(SC,-1,PREV));
    Cum(If(State=1,ROC(C,1,$),0))

    ColumnB
    Name : Short Profit
    Formula :

    BC:=Cross(H,Ref(HHV(H,20),-1)) ;
    SC:=Cross(Ref(LLV(L,20),-1),L);
    State:=If(BC,1,If(SC,-1,PREV));
    Cum(If(State=-1,Neg(ROC(C,1,$)),0))

    ColumnC
    Name : Long/Short Profit
    Formula :

    BC:=Cross(H,Ref(HHV(H,20),-1)) ;
    SC:=Cross(Ref(LLV(L,20),-1),L);
    State:=If(BC,1,If(SC,-1,PREV));
    Cum(If(State=1,Roc(C,1,$),If(State=-1,Neg(ROC(C,1,$)),0)))

    Now let's modify this so that it calculates profit as soon as our condition is met. Which here really means "let's add a specific entry price to the formula".
    Earlier I said you want your entry price to be a tiny bit above X
    X = Ref(HHV(H,20),-1) or X = Ref(LLV(L,20),-1) +
    tinybit= 0.01 or tinybit= -0.01 :)

    Here is the final exploration

    ColumnA
    Name :Long Profit
    Formula :

    BC:=Cross(H,Ref(HHV(H,20),-1)) ;
    SC:=Cross(Ref(LLV(L,20),-1),L);
    State:=If(BC,1,If(SC,-1,PREV));
    LEntryPRICE:=ValueWhen(1,Cross(State,0),Ref(HHV(H,20),-1))+0.01;
    LExitPRICE:=ValueWhen(1,Cross(0,State),Ref(LLV(L,20),-1))-0.01;
    SEntryPRICE:=ValueWhen(1,Cross(0,State),Ref(LLV(L,20),-1))-0.01;
    SExitPRICE:=ValueWhen(1,Cross(State,0),Ref(HHV(H,20),-1))+0.01;
    Cum(If(Cross(0,State),LExitPrice-LentryPrice,0))

    ColumnB
    Name : Short Profit
    Formula :

    BC:=Cross(H,Ref(HHV(H,20),-1)) ;
    SC:=Cross(Ref(LLV(L,20),-1),L);
    State:=If(BC,1,If(SC,-1,PREV));
    LEntryPRICE:=ValueWhen(1,Cross(State,0),Ref(HHV(H,20),-1))+0.01;
    LExitPRICE:=ValueWhen(1,Cross(0,State),Ref(LLV(L,20),-1))-0.01;
    SEntryPRICE:=ValueWhen(1,Cross(0,State),Ref(LLV(L,20),-1))-0.01;
    SExitPRICE:=ValueWhen(1,Cross(State,0),Ref(HHV(H,20),-1))+0.01;
    Cum(If(Cross(State,0),SEntryPrice-SExitPrice,0))

    ColumnC
    Name : Long/Short Profit
    Formula :

    BC:=Cross(H,Ref(HHV(H,20),-1)) ;
    SC:=Cross(Ref(LLV(L,20),-1),L);
    State:=If(BC,1,If(SC,-1,PREV));
    LEntryPRICE:=ValueWhen(1,Cross(State,0),Ref(HHV(H,20),-1))+0.01;
    LExitPRICE:=ValueWhen(1,Cross(0,State),Ref(LLV(L,20),-1))-0.01;
    SEntryPRICE:=ValueWhen(1,Cross(0,State),Ref(LLV(L,20),-1))-0.01;
    SExitPRICE:=ValueWhen(1,Cross(State,0),Ref(HHV(H,20),-1))+0.01;
    Cum(If(Cross(0,State),LExitPrice-LentryPrice,If(Cross(State,0),SEntryPrice-SExitPrice,0))

    A few note about this, the columns name are too long I know ...
    I have not tested this ...
    And these formula will unfortunately not include the first 2 trades on each side.

    Do I need to put a disclaimer here saying that this is not a recommendation to buy sell ... :D
    My Site
  •  02-08-2005, 9:14 425 in reply to 120

    Re:

    "Patrick":

    Now I don't think this could done in a system tester, but it can be done in an exploration, a bit like the PS performance explorations...

    Thanks alot my friend,
    Why I can't use that in system tester?



    ( I'm assuming here that your exit signal is the opposite of the entry signal formula )

    Yes, this is right.


    ColumnC
    Name : Long/Short Profit
    Formula :

    BC:=Cross(H,Ref(HHV(H,20),-1)) ;
    SC:=Cross(Ref(LLV(L,20),-1),L);
    State:=If(BC,1,If(SC,-1,PREV));
    LEntryPRICE:=ValueWhen(2,Cross(State,0),Ref(HHV(H,20),-1))+0.01;
    LExitPRICE:=ValueWhen(1,Cross(0,State),Ref(LLV(L,20),-1))-0.01;
    SEntryPRICE:=ValueWhen(2,Cross(0,State),Ref(LLV(L,20),-1))-0.01;
    SExitPRICE:=ValueWhen(1,Cross(State,0),Ref(HHV(H,20),-1))+0.01;
    Cum(If(Cross(0,State),LExitPrice-LentryPrice,If(Cross(State,0),SEntryPrice-SExitPrice,0))


    Do I need to put a disclaimer here saying that this is not a recommendation to buy sell ... :D


    May my LEntry = SExit and vise versa? So I can use :

    LEntryPRICE:=ValueWhen([1,Cross(State,0),Ref(HHV(H,20),-1))+0.01;


    Thanks alot for your time.
    Hani :)
  •  02-08-2005, 15:32 426 in reply to 120

    Re: Re:

    Why I can't use that in system tester?

    Because I don't know what the order type limit or stop really do. :oops:
    And I believe it may affect the results. But I will look into it and confirm that we can't use these or maybe realize that there is a much easier way using the system tester ...

    May my LEntry = SExit and vise versa? So I can use :
    LEntryPRICE:=ValueWhen([1,Cross(State,0),Ref(HHV(H,20),-1))+0.01;

    It is actually a mistake on my part, all the valuewhen functions should use 1. I will edit the formula above and make the corrections.
    My Site
  •  02-08-2005, 15:47 427 in reply to 120

    Re: Re:

    Thanks Patrick for helpful attitude and in time replies

    Hani :)
View as RSS news feed in XML