Big difference with pLOSS on/off even though its never been touched

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #139062 quote
    Trond Steinar Haugen
    Participant
    Average

    Hello

    I’ve made an algo before i knew that the “SET STOP pLOSS xx pTRAILING” did’nt work.

    I used the optimizer to find best combo of the two. It found that the best combo was pLOSS 27 and pTRAILING was 2. Which I thougt was weird. In the backtest the “loss of worst trade” is 2£ which I thougt would indicate that the pLOSS never was touched. However, if I remove the pLOSS function. The backtest results dramatically changes.

    Can anyone explain why?

     

    And I’ve read in here before that the pTRAILING function should not be used because it does not take in to account the trailing step factor.

    But the instrument I’ve been using this bot on has 1 step trailing. And I’ve read somewhere on this forum that the pTRAILING uses 1step trailing. Will the back test be reliable then?

    tradestrat.jpg tradestrat.jpg
    #139067 quote
    GraHal
    Participant
    Master

    Have you got the tick by tick mode box enabled in backtest?

    #139070 quote
    Trond Steinar Haugen
    Participant
    Average

    Yes the tick by tick mode is on.

    #139071 quote
    robertogozzi
    Moderator
    Master

    SET STOP pLOSS xx pTRAILING cannot be used, because two different kind of stops are not allowed.

    Use either SET STOP pLOSS or SET STOP xx pTRAILING.

    If you use both on separate lines, only the last one will be used.

    #139077 quote
    Trond Steinar Haugen
    Participant
    Average

    Yes I know now, but I made the algo before I knew.

    The problem is when i only use the pTRAILING function(remove the pLOSS), the performence dramatically changes. Even though I seems that the pLOSS part of the function never was touched.

    I had the pLOSS on 27 and the pTRAILING on 2, and the “worst trade” was only 2£. Does’nt that mean that only the pTRAILING was executed?

    #139080 quote
    robertogozzi
    Moderator
    Master

    I suggest that you use some trailing stop code instead of the native one.

    #139088 quote
    Trond Steinar Haugen
    Participant
    Average

    I think I’ve tried every hardcoded trailing stops on this forum, but i’m afraid they don’t work. This is because most of my trailing stops happens within a candle.

    What I don’t understand is why  would there be a difference without pLOSS? When the pLOSS is 25 points away.. Is there a bug with the probacktest?

    #139074 quote
    Trond Steinar Haugen
    Participant
    Average

    SET STOP pLOSS xx pTRAILING cannot be used, because two different kind of stops are not allowed.

    Use either SET STOP pLOSS or SET STOP xx pTRAILING.

    If you use both on separate lines, only the last one will be used.

    Yes, as I said in the post, I made this algo before I was aware that this function did’nt work.
    But when I remove the pLOSS  part of the function and only use the pTRAILING, the change is so dramatic even though the pLOSS does’nt seem to be touched in the first algo.

    #139311 quote
    GraHal
    Participant
    Master

    Did you try using GRAPH Set Stop pLoss to see if indeed ploss ever does get triggered?

    #139317 quote
    Trond Steinar Haugen
    Participant
    Average

    Thats a really good idea GraHal.

    How do you code that?

    I tried “GRAPH Set Stop pLoss”. Does’nt seem to work.

    #139318 quote
    GraHal
    Participant
    Master

    I tried “GRAPH Set Stop pLoss”. Does’nt seem to work.

    Mmm try something like below (for a long)  …

    Not tested

    If longonmarket Then
    MyStop = TradePrice - p*pipsize (p = p value in pLoss entry)
    Endif
    
    GRAPH MyStop

    You should get ‘1’  if / when condition / MyStop is true.

    #139322 quote
    Trond Steinar Haugen
    Participant
    Average

    I did’nt manage do get it to work. The GRAPH showed no results, and it did not show any result even if i set the Loss value to less than the trailing stop.

    However, I tried making my own “SET STOP pLOSS” function.

    //Hjemmelagd Stoploss
    IF StoplossHjemmelagdSell = 1 THEN
    mySL = tradeprice(1)+StoplossS*pipsize
    IF NOT ONMARKET THEN
    mySL=0
    ENDIF
    IF mySL>0 THEN
    EXITSHORT AT mySL STOP
    ENDIF
    ENDIF

    I’m having the same huge difference in performance.

    And there is no difference if i turn it on/off.

    So im thinking  that there must be some kind of a bug i the backtesting software?

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.

Big difference with pLOSS on/off even though its never been touched


ProOrder: Automated Strategies & Backtesting

New Reply
Summary

This topic contains 12 replies,
has 3 voices, and was last updated by Trond Steinar Haugen
5 years, 7 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 07/12/2020
Status: Active
Attachments: 1 files
Logo Logo
Loading...