NexusFi: Find Your Edge


Home Menu

 





Convert a value in ticks


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Quick Summary with 1 posts (0 thanks)
    2. looks_two Astrogirl with 1 posts (0 thanks)
    3. looks_3 gregid with 1 posts (1 thanks)
    4. looks_4 trendwaves with 1 posts (1 thanks)
    1. trending_up 3,419 views
    2. thumb_up 2 thanks given
    3. group 3 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
Astrogirl
Milan/Italy
 
Posts: 51 since Oct 2013
Thanks Given: 25
Thanks Received: 12

An hard question! Does anyone know how, in NT scripting language, to convert a decimal value into the relative futures tick price?

Eg.: Convent 1850,68757 into the relative ES futures equivalent 1850,75


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Five Days Until the Gap Dies -- CME Goes 24/7 on All Dig …
Traders Hideout
OneChronos Launches First Combinatorial Auction FX Venue …
Currencies
Kharg Island at 6%, Regime Fall at 1.5% -- The Black Swa …
Prediction Markets & Event Contracts
Hormuz Normalization Collapses to 19.5% -- Iran Regime F …
Prediction Markets & Event Contracts
Kalshi Sets $4.13B All-Time Weekly Record as Polymarket …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #3 (permalink)
 
gregid's Avatar
 gregid 
Wrocław, Poland
 
Experience: Intermediate
Platform: NinjaTrader, Racket
Trading: Ockham's razor
Posts: 649 since Aug 2009
Thanks Given: 320
Thanks Received: 623


Add this method to your strategy/indicator:

 
Code
private double nPrice(double ThePrice) //Normalized Price
        {
            int Temp = (int)Math.Round(ThePrice / TickSize);
            return ((double)Temp * TickSize);
        }
You call it like this:

 
Code
double priceToEnter = nPrice(1850.68757);


Reply With Quote
Thanked by:
  #4 (permalink)
 
trendwaves's Avatar
 trendwaves 
Florida
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader 8
Trading: ES, NQ, CL
Posts: 703 since Dec 2012
Thanks Given: 2,898
Thanks Received: 2,525

The answer to your question is actually a lot more complicated than you may realize.

Read this thread, specifically FatTail's answer to get a feel for what your up against...


Be Patient and Trade Smart
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:




Last Updated on February 24, 2014


© 2026 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 - Downloads - Top
no new posts