NexusFi: Find Your Edge


Home Menu

 





Ninja Trader / Zenfire / Mirus Display Update Interval 0.1


Discussion in Brokers

Updated
      Top Posters
    1. looks_one resist with 5 posts (6 thanks)
    2. looks_two aslan with 4 posts (8 thanks)
    3. looks_3 TheWizard with 2 posts (2 thanks)
    4. looks_4 MetalTrade with 2 posts (0 thanks)
    1. trending_up 8,498 views
    2. thumb_up 16 thanks given
    3. group 2 followers
    1. forum 14 posts
    2. attach_file 3 attachments




 
Search this Thread

Ninja Trader / Zenfire / Mirus Display Update Interval 0.1

  #11 (permalink)
 resist 
Berlin Germany /Alicante Spain
 
Experience: Intermediate
Platform: NinjaTrader
Broker: DDT/Rithmic, Global/CQG, IB, Mirus(Ninja)/MarketDelta
Trading: Futures
Posts: 141 since Jan 2010
Thanks Given: 362
Thanks Received: 67


aslan View Post
The trick is to force NT to replot when you get a tick.
...

Fantastic, at least another step!!! Thank you very much for your code advice.

I like to use pricelineWH (https://forum.ninjatrader.com/local_links.php?action=ratelink&linkid=364&catid=4&lpage=1) indicator which only plots a line for last price, I think it would be great to put your suggestion in this indicator to test, I´ll try it as I´ve no knowledge to code a complete indicator.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
Trade idea based off three indicators.
Traders Hideout
Quantum physics & Trading dynamics
The Elite Circle
About a successful futures trader who didnt know anythin …
Psychology and Money Management
What broker to use for trading palladium futures
Commodities
 
  #12 (permalink)
 
aslan's Avatar
 aslan 
Madison, WI
 
Experience: Advanced
Platform: ALT
Trading: ES
Posts: 625 since Jan 2010
Thanks Given: 356
Thanks Received: 1,127


RJay View Post
Being a volume nut, I have looked for a way to force updates with changes in volume.

Will this patch work in the OnMarketData section as well??

Yes and no. Yes, calling the given code will cause a refresh. No, because bars are not updated yet (OnMarketData is called before OnBarUpdate). So if you intention is to update based on the bars, you are out of luck, but if you had a custom plot method that was plotting a text item or placing a line based on some other internal var that was updated in OnMarketData, that would work. Hopefully, I am conveying the concept.

Not sure what you mean by volume. The volume updates with each call to OnBarUpdate, so not sure why you need OnMarketData for that. Perhaps you mean the bid/ask sizes.

Reply With Quote
Thanked by:
  #13 (permalink)
 resist 
Berlin Germany /Alicante Spain
 
Experience: Intermediate
Platform: NinjaTrader
Broker: DDT/Rithmic, Global/CQG, IB, Mirus(Ninja)/MarketDelta
Trading: Futures
Posts: 141 since Jan 2010
Thanks Given: 362
Thanks Received: 67



aslan View Post
The trick is to force NT to replot when you get a tick. This is a dangerous item if you don't know what you are doing, as you could start using way more CPU to do this. This trick only needs to be in ONE indcator. At the end of the OnBarUpdate() method, add the following:

 
Code
if (ChartControl != null)
    if (ChartControl.ChartPanel != null)
        ChartControl.ChartPanel.Invalidate();
This code will force the chart to refresh on each tick, so user beware. Your initial comment, that CPU will be fine if you manage the number of charts/indicators is spot on. To be sure you only do this in one indicator, you could have an indicator, that just refreshes the screen, but I have not tried that.

Note: This will do nothing for the DOM update interval.

This is my first indicator and I simply added your 3 lines into standard ninja script indicator file, will this work? (did it just now and markets are calm and I cannot see any higher cpu usage so I´m wondering if I´m right).

Attached Files
Elite Membership required to download: NullLatency.zip
Started this thread Reply With Quote
Thanked by:
  #14 (permalink)
 
aslan's Avatar
 aslan 
Madison, WI
 
Experience: Advanced
Platform: ALT
Trading: ES
Posts: 625 since Jan 2010
Thanks Given: 356
Thanks Received: 1,127

The code needs to go in the OnBarUpdate() method, not Initialize(). Also, make sure CalcOnClose is set to false, or it will only be called at the end of the bar.

Also, if there is nothing going on, you are not going to notice any difference. This code will make little or no difference for 99% of indicators. The NT update interval of .1 s is essentially 10 frames per sec, which is not real fast, but when you think about what you need to see on a chart and how fast you can interpret the info, it is generally fast enough. There are a few indicators (i.e. level2) which do benefit from this code, but you will incur the extra CPU cycles of doing extra screen updates.

The reason people get in trouble, is they think they need all of their charts/indicators to update every tick. This just is not the case.

Reply With Quote
Thanked by:
  #15 (permalink)
 resist 
Berlin Germany /Alicante Spain
 
Experience: Intermediate
Platform: NinjaTrader
Broker: DDT/Rithmic, Global/CQG, IB, Mirus(Ninja)/MarketDelta
Trading: Futures
Posts: 141 since Jan 2010
Thanks Given: 362
Thanks Received: 67

There is another issue see here: Maximum frequency of updates to OnMarketData/Depth No3 - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum
(Also posted here , I don´t want to spam the board but for me it´s very important that there comes pressure to Zenfire to deliver what they promise: unfiltered ... therefore I make several posts).
As mentioned before in other threads as I´m no programmer I can only believe when I´m told that I receive complete tape an no fragments. We´ll se what they answer, I asked already Mirus to check about, they told me they ask Zenfire techs - would be great if other could give information, too.

Started this thread Reply With Quote
Thanked by:




Last Updated on October 18, 2010


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts