Announcement

Collapse
No announcement yet.

Clicking on View "Show Backtest Results" Crashes ESignal ( V11.5 SP1)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Clicking on View "Show Backtest Results" Crashes ESignal ( V11.5 SP1)

    What am I doing? : Trying to see the back-test results of my strategy.

    What is going on? : I have coded the EFS to paint the background with a particular color for each Long and Short trades. Applying the EFS on the chart shows the trades and I able to visually see the logic working absolutely fine.

    What is the problem? : The moment I click "Show Backtest Results" ESignal crashes.

    What is causing the problem? : Two particular lines in my code (One line in the Short Entry Logic other in the Long entry logic). I have pasted the part of the code below which handles the Short entry logic.


    .
    .
    .
    nCandle_Count++; // Counts the number of candles since the last position has been taken or position has been closed


    // Short Entry Signal

    var bShort_1 = xxxxxxxxxx //( Cant share the logic, but what all it does is,being a boolean variable generates either a True or False)


    if(bShort_1 == true){ // this part of code decides whether to go short or just cut my already long position based on 'nCandle_Count' compared to nCandle_Count_Threshold
    if(Strategy.isLong()==true && nCandle_Count < nCandle_Count_Threshold){

    Strategy.doSell("Long Threshold close",Strategy.MARKET,Strategy.THISBAR); // This is the line which is crashing Esignal. When I disable this line by commenting it out, i am able to see backtest results but my logic is getting affected
    nCandle_Count=1;
    }

    if(Strategy.isShort() == false && nCandle_Count >=nCandle_Count_Threshold){
    Strategy.doShort("Short Signal",Strategy.MARKET,Strategy.THISBAR);
    nCandle_Count=1;
    }



    Why is this happening ? : I DONT KNOW, Can somebody help ?

  • #2
    indus383
    That line of code is working fine when used in other contexts so it is not possible to determine what the problem is based on the snippet of code you posted.
    As suggested in the guidelines for this forum you should post a complete working example of the code that illustrates the problem so that others can try to assist you
    Alex


    Originally posted by indus383 View Post
    What am I doing? : Trying to see the back-test results of my strategy.

    What is going on? : I have coded the EFS to paint the background with a particular color for each Long and Short trades. Applying the EFS on the chart shows the trades and I able to visually see the logic working absolutely fine.

    What is the problem? : The moment I click "Show Backtest Results" ESignal crashes.

    What is causing the problem? : Two particular lines in my code (One line in the Short Entry Logic other in the Long entry logic). I have pasted the part of the code below which handles the Short entry logic.


    .
    .
    .
    nCandle_Count++; // Counts the number of candles since the last position has been taken or position has been closed


    // Short Entry Signal

    var bShort_1 = xxxxxxxxxx //( Cant share the logic, but what all it does is,being a boolean variable generates either a True or False)


    if(bShort_1 == true){ // this part of code decides whether to go short or just cut my already long position based on 'nCandle_Count' compared to nCandle_Count_Threshold
    if(Strategy.isLong()==true && nCandle_Count < nCandle_Count_Threshold){

    Strategy.doSell("Long Threshold close",Strategy.MARKET,Strategy.THISBAR); // This is the line which is crashing Esignal. When I disable this line by commenting it out, i am able to see backtest results but my logic is getting affected
    nCandle_Count=1;
    }

    if(Strategy.isShort() == false && nCandle_Count >=nCandle_Count_Threshold){
    Strategy.doShort("Short Signal",Strategy.MARKET,Strategy.THISBAR);
    nCandle_Count=1;
    }



    Why is this happening ? : I DONT KNOW, Can somebody help ?

    Comment

    Working...
    X