Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get Property Function Not Defined When Working with Historical Data?

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

    Get Property Function Not Defined When Working with Historical Data?

    I am developing an indicator which prints a message when running on historical data instead of a sound alarm. I noticed whether I access the Values[] arrray directly or use the property exporting the Values makes a difference in the value reported.

    I added the following lines of code in the GomDeltaVolume indicator in the GomOnBarUpdateMethod to illustrate what I am seeing. I am attaching my file which is running on a 1 minute RTH chart of ES.

    Perhaps I am mistaken in my belief that the Get Property functions can be used in this way. But the code does use the complementary Set statements like the one below to fill the Values data-series.

    DownVolume.Set(downvolume);

    Code:
    protected override void GomOnBarUpdate()
            {
    
    	if (CurrentBar>lastcalcbar)
                {
        [I]            #region AVIAT
                    if (CurrentBar > 2)
                    {
                        Print(Time[1] + " GETSET " + UpVolume.Get(1) + " " + DownVolume.Get(1) + " " + TotalVolume.Get(1));
                        Print(Time[1] + "Values " + Values[0][1] + " " + Values[1][1] + " " + Values[2][1]);
    
                    }
    
                    #endregion[/I]
    The output shows that the values printed when using the property function is not correct. This occurs when reloading historical data using GOM indicators' in built capability to pump in stored historical tick data. In my original test-case instead of printing zero it was printing the last price values of ES.

    Code:
    .....
    4/7/2010 10:07:00 AMValues 611 0 4865
    4/7/2010 10:08:00 AM GETSET 0 0 0
    4/7/2010 10:08:00 AMValues 0 45 2181
    4/7/2010 10:09:00 AM GETSET 0 0 0
    4/7/2010 10:09:00 AMValues 556 0 3917
    4/7/2010 10:10:00 AM GETSET 0 0 0
    4/7/2010 10:10:00 AMValues 0 103 1698
    4/7/2010 10:11:00 AM GETSET 0 0 0
    4/7/2010 10:11:00 AMValues 921 0 8499
    4/7/2010 10:12:00 AM GETSET 0 0 0
    4/7/2010 10:12:00 AMValues 0 9 3862
    4/7/2010 10:13:00 AM GETSET 0 0 0
    4/7/2010 10:13:00 AMValues 81 0 3297
    4/7/2010 10:14:00 AM GETSET 0 0 0
    4/7/2010 10:14:00 AMValues 66 0 1861
    .........
    What am I missing here?
    Attached Files

Latest Posts

Collapse

Topics Statistics Last Post
Started by CarlTrading, 03-31-2026, 09:41 PM
1 response
81 views
1 like
Last Post NinjaTrader_ChelseaB  
Started by CarlTrading, 04-01-2026, 02:41 AM
0 responses
42 views
0 likes
Last Post CarlTrading  
Started by CaptainJack, 03-31-2026, 11:44 PM
0 responses
64 views
2 likes
Last Post CaptainJack  
Started by CarlTrading, 03-30-2026, 11:51 AM
0 responses
66 views
0 likes
Last Post CarlTrading  
Started by CarlTrading, 03-30-2026, 11:48 AM
0 responses
54 views
0 likes
Last Post CarlTrading  
Working...
X