Convert a value in ticks - NinjaTrader Programming | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming

Convert a value in ticks
Started:February 24th, 2014 (03:25 PM) by Astrogirl Views / Replies:580 / 3
Last Reply:February 24th, 2014 (03:49 PM) Attachments:0

Welcome to

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

Convert a value in ticks

Old February 24th, 2014, 03:25 PM   #1 (permalink)
Trading Apprentice
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES, YM, NQ, FDAX
Astrogirl's Avatar
Posts: 49 since Oct 2013
Thanks: 25 given, 4 received

Convert a value in ticks

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

Old February 24th, 2014, 03:25 PM   #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.


Old February 24th, 2014, 03:47 PM   #3 (permalink)
Elite Member
London, UK
Futures Experience: Intermediate
Platform: NinjaTrader, Julia
Favorite Futures: Ockham's razor
gregid's Avatar
Posts: 638 since Aug 2009
Thanks: 311 given, 586 received

Add this method to your strategy/indicator:

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

double priceToEnter = nPrice(1850.68757);

Last edited by gregid; February 24th, 2014 at 03:53 PM.
Reply With Quote
The following user says Thank You to gregid for this post:

Old February 24th, 2014, 03:49 PM   #4 (permalink)
Elite Member
Futures Experience: Advanced
Platform: NT8
Favorite Futures: ES, NQ, YM, CL
trendwaves's Avatar
Posts: 664 since Dec 2012
Thanks: 2,382 given, 2,037 received

A Trick Question !

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
Reply With Quote

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > Convert a value in ticks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
HiLoOfTimeRange Convert to NT 7 kingfish88 NinjaTrader 5 April 2nd, 2015 11:39 PM
Convert String to double westsider NinjaTrader Programming 5 December 6th, 2013 02:01 AM
The morning ticks calitrader Elite Trading Journals 42 March 7th, 2013 12:58 PM
Can anyone convert a code from TOS j8fire ThinkOrSwim 8 July 18th, 2012 08:24 PM
Need help Convert NT to EasyLanguage trdmny EasyLanguage Programming 2 March 14th, 2012 08:39 AM

All times are GMT -4. The time now is 05:04 PM.

Copyright © 2016 by 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.
no new posts

Page generated 2016-10-27 in 0.08 seconds with 19 queries on phoenix via your IP