Announcement

Collapse
No announcement yet.

Could use some help

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

  • Could use some help

    The attached script prints out the close() price to a report every minute in both live mode and in playback on a 60 minute candle. What we don’t understand is why there are differences between the two reports. It’s a simple program that only does one thing, and that is to print out close() price so that the two sets of prices can be compared in Excel. Simple to use, set the month, day and hour (getMonth(0) == 5 && gDate == 3 && hh == 12) for one hour in the future and let it run live, then download 1 day of tic data and playback the script.



    Any help in figuring out why the data collected is different would be greatly appreciated.

    Brad
    Attached Files

  • #2
    Re: Could use some help

    Brad
    It seems to me that the logic you are using in your script would not function properly as I don't believe you are correctly syncing the appropriate data between intervals.
    To do this correctly you would need to retrieve the values of the external interval’s prior bar at each new bar of the external interval
    Alex


    Originally posted by bradburk
    The attached script prints out the close() price to a report every minute in both live mode and in playback on a 60 minute candle. What we don’t understand is why there are differences between the two reports. It’s a simple program that only does one thing, and that is to print out close() price so that the two sets of prices can be compared in Excel. Simple to use, set the month, day and hour (getMonth(0) == 5 && gDate == 3 && hh == 12) for one hour in the future and let it run live, then download 1 day of tic data and playback the script.



    Any help in figuring out why the data collected is different would be greatly appreciated.

    Brad

    Comment


    • #3
      Re: Could use some help

      Hi bradburk,

      I was looking at your post and noticed that your use of the close() Series to retrieve the current chart close(0) price is not the proper technique and is also quite inefficient. If you look back through my posts you will see where I have discussed how to efficiently access the most recent tick price. I notice Alex had replied when I was composing my reply. He describes how to properly obtain the bar value from an external interval. Based on my understanding of EFS and testing experience, the technique he described is the best way to ensure you capture the correct values. Check out the link below where I went over external intervals in some detail. You can also search the forum where there are several other examples.




      Originally posted by bradburk
      The attached script prints out the close() price to a report every minute in both live mode and in playback on a 60 minute candle. What we don’t understand is why there are differences between the two reports. It’s a simple program that only does one thing, and that is to print out close() price so that the two sets of prices can be compared in Excel. Simple to use, set the month, day and hour (getMonth(0) == 5 && gDate == 3 && hh == 12) for one hour in the future and let it run live, then download 1 day of tic data and playback the script.



      Any help in figuring out why the data collected is different would be greatly appreciated.

      Brad

      Comment


      • #4
        Steve and Alexis,

        I’ve been out of town for a week but wanted to say thank you for looking into my problem. With what you’ve pointed out, I am going to take another crack at solving it…. Thanks again, I appreciate you taking a look at this.



        Brad

        Comment

        Working...
        X