Announcement

Collapse
No announcement yet.

Jump versus Playback

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

  • Jump versus Playback

    I've written a script that draws particulars on the chart when played back. If i Jump through the tic file (7500 minutes at a time and I do this twice to get to the end of the file), results are where i would expect them. Particulars are based on close(-1) .

    When i play back the tic file at 200 times running the script, particulars are not the same. I understand from other postings that using fast forward cause the efs to reload each candle or at the end of the Jump.

    My problem is that i would like my results to be the same in normal playback ( at 200 times ) as they are when i Jump through the tic file from begining to end. Is there a way to achieve the same results, using close(-1) when playing back the file as i get when i Jump through the tic file?
    Any assistance would be greatly appreciated.
    Dave

  • #2
    actually...I also use sma() in the calculations and i believe this is where the issue lies ...

    is there a way to convert sma() so that i will receive same results when fast forwarding through a tic file or doing a normal playback ?

    Thanks

    Comment


    • #3
      Originally posted by DaveJackson
      actually...I also use sma() in the calculations and i believe this is where the issue lies ...

      is there a way to convert sma() so that i will receive same results when fast forwarding through a tic file or doing a normal playback ?

      Thanks
      Hi DaveJackson,


      Not sure if this will resolve the problem between speed and jump, but you may want to try using sma(-1).

      In general whenever I saw a similiar problem it was because I was using index 0 on my indicators. In you case sma() is the same a sma(0).

      In realtime or tick replay because any series with index 0 like sma in this case, changes with each tick the "particulars" like bar background painting or trade profit results will rarely match historical bar processing which may be the same a what you are seeing with jump.

      When processing completed bars the sma value is the vale when the bar closed.

      The way I've corrected this problem is to change barindex 0 to 0-1, or sma(-1) in you case.

      Hope it helps,

      Glen
      Glen Demarco
      [email protected]

      Comment


      • #4
        Hi Glen,
        Thanks for getting back to me so quickly..... actually i'm using sma(4) .... would the equivalent be sma(-3) ?

        Dave

        Comment


        • #5
          Originally posted by DaveJackson
          Hi Glen,
          Thanks for getting back to me so quickly..... actually i'm using sma(4) .... would the equivalent be sma(-3) ?

          Dave
          Dave,

          Your welcome.

          I may be helpful to post the EFS code as it's difficult to know whats going on without it.


          Don't think sma(4) and sma(-3) are equivalent.

          sma(4) is a 4 period simple moving average, with I think the implicit default parameters of close as the source and an index of 0 , the same a specifying sma(4, close(0))

          sma(-3) doesn't look like a valid use of the sma function but again without the code it's difficult to help.

          Glen
          Glen Demarco
          [email protected]

          Comment

          Working...
          X