How get the price value - NinjaTrader Programming | futures trading

Go Back

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

How get the price value
Started:February 24th, 2014 (12:27 PM) by Astrogirl Views / Replies:352 / 3
Last Reply:March 8th, 2014 (01:40 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

How get the price value

Old February 24th, 2014, 12:27 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

How get the price value

Hello everyone,

my trade stoploss level is automatically set by this row:

SetStopLoss("", CalculationMode.Percent, variable1, false);

At the same time I would let the strategy draw a line on the chart with this row:

DrawHorizontalLine("My horizontal line" + CurrentBar, stopline, Color.Red);

Well... how can I get the numeric value of the stopline variable?

In other words:
double stopline = ?!?!?

Last edited by Astrogirl; February 25th, 2014 at 07:08 AM.
Reply With Quote

Old February 24th, 2014, 12:27 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 March 7th, 2014, 04:37 PM   #3 (permalink)
Elite Member
Denver Colorado
Futures Experience: Advanced
Platform: NinjaTrader
Favorite Futures: ES
Posts: 9 since Aug 2012
Thanks: 0 given, 3 received

Two ways you could do this (and I'm sure there are others):

position.AvgPrice to get your avg fill price and then manually calculate the stop level

Or you could use IOrders to place your exits.


I'd provide links but it won't yet let me post links

Reply With Quote
The following user says Thank You to shazzmoe for this post:

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > How get the price value

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

An Afternoon with FIO trader bobwest

Elite only

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
Which typ of order I need to buy or sell at the Last Price (Chart Price) TraderMaze Index Futures Trading 8 April 22nd, 2014 08:25 AM
Price band for Price levels jphillips9 Sierra Chart 2 May 23rd, 2013 03:29 PM
Execution price not matching position price gparkis NinjaTrader 9 December 6th, 2012 11:34 AM
Settlement Price vs. Closing Price srgtroy The Elite Circle 3 June 26th, 2011 01:15 AM
What's better, Price alone, or Price + Volume Profiling? josh Traders Hideout 14 March 11th, 2011 09:51 PM

All times are GMT -4. The time now is 08:20 AM.

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-23 in 0.08 seconds with 20 queries on phoenix via your IP