Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Delta Buy/Sell Volume

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

    I've met the similar issue when I've tried to add GomCD to strategy - the problem is that Instrument is null in this case(do not know if this is a bug or feature of NT), so GomCD is unable to open the log file. I have to add currentInstrument variable to GomRecorderIndicator code and to set it manually.

    Comment


      I think we're starting to have some problems here, and I'm pretty sure it worked in Beta 3, because I had a GomHA working.

      As stated by other posters , Instrument is null so a lot of things stop working, and you just can't move all init code to OnBarUpdate()

      I'm filing a bug on NT7 thread.

      Comment


        As to me, I'm on NT6.5, and Instrument is null only when I'm adding GomCD to strategy, indicators based on GomCDDemoIndicator are working okay.

        I've found one little issue with recent GomRecorderIndicator code. I have globex session start at 2.00am local time and session end at 1.00am,
        so the following time check in code is producing incorrect results.

        protected virtual void GomOnMarketDataWithTime(DateTime tickTime, TickTypeEnum tickType,double price,int volume,bool firstTickOfBar)
        {

        //if ((tickTime>=BeginTime)&&(tickTime<=EndTime))
        GomOnMarketData( tickType, price, volume, firstTickOfBar);

        }

        Comment


          sorry for that one :-o
          quick correction before new gomrecorder release :
          in RecorderIndicator, replace in OnBarUpdate

          if (EndTime==BeginTime)
          EndTime=BeginTime.AddDays(
          1);

          with

          if (EndTime<=BeginTime)
          EndTime=EndTime.AddDays(
          1);

          Comment


            Originally posted by gomifromparis View Post
            This should work better :
            Is this version for NT v7 only? I tried it in NT v6.5 and it does not show anything. 4.1b works just fine.

            Comment


              Here's a new version for nt6.5 and nt7.

              It should correct the time issues in NT6.5, explaining some empty charts.

              I added a parameter in GomCD/GomRecorder : if you define an Environment Variable named GOMFOLDER, the files will be written and read there.

              I also added a GomOnBarUpdate method that you should use on your derived indicator instead of OnBarUpdate. In that case you don't need to call base.OnBarUpdate()

              As per NT7 new recommandations to not use Initialize() for anything useful, all init code has been moved to OnBarUpdate but this has consequences for those who embed GomCD.
              I show an example (GomCDSMA indicator) of how you can manage without.
              in 6.5 you can write
              Code:
               
              indic=SMA(GomCD(GomCDCalculationModeType.BidAsk,GomCDChartType.CumulativeChart,GomFileFormat.Binary,GomFilterModeType.None,1,false).DeltaClose,5);
              in Initialize(), which you can't do in 7.0

              If you do that in 7.0 in OnBarUpdate you're f**ed because DeltaClose time series doesn't exist before the first call on OnBarUpdate (remember the cool idea to move all init code in OnBarUpdate())

              So you have to instantiate the GomCD, than do a fake call on DeltaValue[0], which is the base time series, this calls OnBarUpdate and finally you can work.

              So with this new improved V7, the line
              Code:
               
              indic=SMA(GomCD(GomCDCalculationModeType.BidAsk,GomCDChartType.CumulativeChart,GomFileFormat.Binary,GomFilterModeType.None,1,false).DeltaClose,5);
              becomes
              Code:
              [FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] (!initdone)[/SIZE][/FONT]
              [SIZE=2][FONT=Courier New]{[/FONT][/SIZE]
              [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000]// we instantiate a gomCD[/COLOR][/SIZE][/FONT]
              [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]gcd=GomCD(GomCDCalculationModeType.BidAsk,GomCDChartType.CumulativeChart,GomFileFormat.Binary,GomFilterModeType.None,[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]1[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2],[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]);[/SIZE][/FONT]
              [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000]//data series don't exist because they're created in onbarupdate() and for now only Initialize has been called.[/COLOR][/SIZE][/FONT]
              [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000]//dummy call to call OnBarUpdate so dataseries get created[/COLOR][/SIZE][/FONT]
              [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] dummy=gcd.DeltaValue[[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]];[/SIZE][/FONT]
               
              [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000]//now the Dataseries exist we can work with gcd dataseries.[/COLOR][/SIZE][/FONT]
              [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]
              [SIZE=2][FONT=Courier New][SIZE=2][FONT=Courier New]indic=SMA(gcd.DeltaClose,[/FONT][/SIZE][/FONT][/SIZE][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]5[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]); [/SIZE][/FONT]
              [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000]//double dummy=indic.DeltaValue[0];[/COLOR][/SIZE][/FONT]
              [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]initdone=[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]true[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2];[/SIZE][/FONT]
              [SIZE=2][FONT=Courier New]}[/FONT][/SIZE]
              [/SIZE][/FONT]
              And of course you have a nicer code with dirty init code in OnBarUpdate(). How cooler can we get
              Attached Files

              Comment


                which gomcd?

                I am still using ninjatrader 6.5 which is the best gomcd to use with it?

                Comment


                  Originally posted by Ninjaman View Post
                  I am still using ninjatrader 6.5 which is the best gomcd to use with it?
                  I'm using v5.3 on NT6.5. Works just fine.

                  Comment


                    Originally posted by Eternum View Post
                    I'm using v5.3 on NT6.5. Works just fine.
                    Thank you.

                    Comment


                      Gomi,

                      I am having a problem with GomiCD (5.3) and NT7 (b4). When I place GomiCD on ES and set to record no plot is displayed (Recording OK msg is shown). The ES file is created and it appears to grow in size at a proportional rate. There is an error in the Control center log which says "Error on calling 'Dispose' method for indicator 'GomiCD'. Cannot access a closed file".

                      I am in Australia and have tried several different Session Manager settings for ES without success. I have also deleted the charts/indicators and the file and setup again but no change.

                      Thing is - GomiCD is working fine for the local exchange instruments so i dont think this is an NT7 issue.

                      Any ideas?

                      Thanks

                      Comment


                        You can try this one.
                        I also corrected a bug in NT7 : if you used 24/7 you missed data on mondays.
                        Attached Files

                        Comment


                          Originally posted by gomifromparis View Post
                          You can try this one.
                          I also corrected a bug in NT7 : if you used 24/7 you missed data on mondays.

                          Gomi,

                          I installed 5.3, and and then 5.4 and it seems that when I change the timeframe of the chart, it retrospectively shuts the recorder off at the beginning of the session, even though it had been recording data. As an example, I run a cummulative Gomcd. if my chart properties are set to 12:00 AM to 12:00 AM and at 8:00 AM I decide to change the timeframe from, say, 5 min to 10 minute, the cumulative data from 12:00 am will disappear, and it will begin recording again from that point on, leaving what appears to be a gap in the gomcd data, even though there was data there before. Also, the recorder message changes from recording short OK to recording OFF. The issue began when I installed 5.3 and still exists with 5.4. And, it doesn't matter if write is set to true.
                          Last edited by Ninjaman; 11-12-2009, 07:43 AM.

                          Comment


                            sorry, couldn't reproduce that one in 6.5 or 7
                            please check your log tab in NT
                            if there are holes in the file, it means it was not really recording

                            Comment


                              Finally reproduced it. Filing a bug !

                              Comment


                                Gomi,

                                Not sure if my issue is related to the one immediately below...

                                Anyway - I have installed GomCD 5.4. Using the custom session shown in the attachment, the Recorder works (Recording OK) but will not display any plot. If I open a second ES chart and add GomCD - again no plot unless I use either Default 24/7 or 24/5 as Session Templates. Then the plot populates from the recorder file.

                                The log error I mentioned in previous post no longer appears...

                                Thanks
                                Attached Files

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by rbeckmann05, Yesterday, 06:48 PM
                                1 response
                                12 views
                                0 likes
                                Last Post bltdavid  
                                Started by llanqui, Today, 03:53 AM
                                0 responses
                                6 views
                                0 likes
                                Last Post llanqui
                                by llanqui
                                 
                                Started by burtoninlondon, Today, 12:38 AM
                                0 responses
                                10 views
                                0 likes
                                Last Post burtoninlondon  
                                Started by AaronKoRn, Yesterday, 09:49 PM
                                0 responses
                                15 views
                                0 likes
                                Last Post AaronKoRn  
                                Started by carnitron, Yesterday, 08:42 PM
                                0 responses
                                11 views
                                0 likes
                                Last Post carnitron  
                                Working...
                                X