Announcement

Collapse
No announcement yet.

Different bardata

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

  • Different bardata

    We have different time stamps with real-time and historical data

    e.g. YM #F 5min at 10/01/2010

    historical: high()

    21:55 10768
    22:00 10771
    22:05 10770
    22:10 10771

    realtime/Tick Replay high(inv(5))

    22:00 10768
    22:05 10771
    22:10 10770

    What can one do around same results to receive?

  • #2
    Example: Process in real time or Tick Reload.
    After some time reload the EFS.
    (e.g. YM #F 5min)

    function preMain()
    {
    setStudyTitle("Test TimeStamp");
    var fp2 = new FunctionParameter("TimeFrame",
    FunctionParameter.NUMBER);
    fp2.setName("Time frame");
    fp2.setDefault(5); // default 5 minutes
    }

    var nBarMinute_last = null;

    function main(TimeFrame)
    {

    var feedDate = new Date(getValue("time"));

    if (getMinute() == getMinute(inv(TimeFrame)) &&
    nBarMinute_last != getMinute(inv(TimeFrame)))
    {
    debugPrintln(feedDate.toLocaleDateString() + " "
    + feedDate.toLocaleTimeString()
    + " High(inv(" + TimeFrame + ")) "
    + high(inv(TimeFrame)));
    nBarMinute_last = getMinute();
    }

    }
    Last edited by geme; 10-05-2010, 05:55 AM.

    Comment

    Working...
    X