Announcement

Collapse
No announcement yet.

Button to autoscroll the chart to the next backtest trade

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

  • Button to autoscroll the chart to the next backtest trade

    I would like a button from an efs to aid me in backtesting that when the button is clicked, the chart scrolls itself (in zero time, it jumps) to next trade of the backtest and centers that trade on the screen. Is this possible with an efs?

    My idea of how to do it would be when a new trade is triggered when main() is calculating the backtest, that triggering bar's barcount would be added to an array via getCurrentBarCount(). When the next trade or previous trade button is then clicked, the chart would jump to that offset of bar count and center it on the screen. I looked through every efs function and there appears to be no functions which manipulate the scrolling behavior of eSignal charts (as expected).

    If this functionality isn't possible with efs but is possible with the eSignal API, please tell me which functions of the eSignal API would be the ones to use to do this.

    Thank you

  • #2
    I found out something. Ctrl + Left Arrow and Ctrl + Right Arrow scroll eSignal charts one chart width at a time. I did not previously know this until I experimented.

    Comment


    • #3
      I found an alternative solution to this issue. It is a solution that uses the colors of the rainbow instead of a button.

      The solution is to color code the outcomes of one's backtesting activities. Here is pseudo EFS code of how my backtest.efs file is set up:

      PHP Code:
      if (Indicator pattern I am interested in for shorting)
      {
          if (
      Not enough volatilitylarge gaps, or corresponding price action does not represent indicator pattern well enough)
          {
              
      // do not take trade;
              
      setBarBgColor(Color.olive); 
          }
          else
          {
              
      take trade;
              
      setBarBgColor(Color.maroon);
          }
      }
      if (
      TestForExit()) // and exit is of type loss
          
      setBarBgColor(Color.blue);
      if (
      TestForExit()) // and exit is of type win
          // do not change color from maroon; 


      As seen in the picture, it is good that the first olive color short was not taken for that would have been a loss. It is good that the short that follows the first olive color was a win. It is bad that the second olive color short was not taken for that would have been a win. And it is bad that the last short was a loss.

      With this color coding I am able to quickly scroll to trades of interest via looking for colors instead of examining every trade to determine if it was a win or a loss. Ctrl + Left Arrow and Ctrl + Right Arrow, as posted about below, help to quickly scroll to colors of interest. Once I have reached a color of interest, I can then use my brain's pattern recognition faculties given to me courteous of being human to identify possible improvements to my trading system.
      Last edited by Foober; 04-05-2008, 02:50 PM.

      Comment

      Working...
      X