Using currentHigh/Low Open - NinjaTrader Programming | futures trading

Go Back

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

Using currentHigh/Low Open
Started:January 13th, 2011 (11:16 PM) by jtradr Views / Replies:616 / 3
Last Reply:January 14th, 2011 (07:24 PM) Attachments:1

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

Using currentHigh/Low Open

Old January 13th, 2011, 11:16 PM   #1 (permalink)
Trading Apprentice
Futures Experience: Beginner
Platform: NinjaTrader
Posts: 26 since Dec 2010
Thanks: 16 given, 27 received

Using currentHigh/Low Open

I am looking to use the current day High Low and Open in a strategy.

What is the easiest way to get NT to recognize CurrentHigh in my trade executions.

For example I have a custom line indicator where I want to look for a crossbelow but only if the close of 1 bar ago was above this indicator and a certain number of ticks from the current high. Therefore I need to use CurrentHigh -10*TickSize and I get an error saying that the name CurrentHigh does not exist in the current context. I have a line: Add(CurrentDayOHL());
trying to call on that indicator but it doesn't work.

Thank you in advance.


Reply With Quote

Old January 13th, 2011, 11:16 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 January 13th, 2011, 11:25 PM   #3 (permalink)
Site Administrator
Manta, Ecuador
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
Big Mike's Avatar
Posts: 45,447 since Jun 2009
Thanks: 28,848 given, 79,603 received

Going solely based on memory, typing free hand, not tested...

# vars

private double dayHighdayLow;

# onbarupdate
dayHigh CurrentDayOHLC().CurrentHigh[0];
dayLow CurrentDayOHLC().CurrentLow[0]; 
I don't know about NT7 but I never really liked using CurrentDayOHLC with NT 6.5, I always kept track of the session high/low myself and reset it on a new session.


Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

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

Old January 14th, 2011, 07:24 PM   #4 (permalink)
Trading Apprentice
Futures Experience: Beginner
Platform: NinjaTrader
Posts: 26 since Dec 2010
Thanks: 16 given, 27 received

I am having a problem where my strategy enters the first position of the day and then ignores all profit target and stop loss. Is this because I have my:

private void go long()



lines inside the Initialize() portion of the code? I tried to move it to the OnBarUpdate() section and it comes back with a lot of Expected class, delegate, enum, interface, or struct errors so I am assuming there is something that OnBarUpDate doesn't like in there.

The full code is attached.

Thank you in advance.

Attached Files
Register to download File Type: txt BigMikeHelp3.txt (4.0 KB, 10 views)
Reply With Quote

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > Using currentHigh/Low Open

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
Open E-Cry HJC333 Brokers and Data Feeds 26 March 16th, 2014 10:40 AM
Is it possible to achieve BOX: HIGH + LOW + OPEN + CLOSE/actual price ? inmax NinjaTrader 6 December 30th, 2010 02:07 PM
Volitility indicator question - Open - Open / open - close / close to open andresimon NinjaTrader 2 September 27th, 2010 12:33 AM
3 bar high/low entry maintain active order until 3 bar high/low in opposite direction mrticks NinjaTrader Programming 8 November 13th, 2009 07:44 PM
Open Interest toulouse-lautrec NinjaTrader 0 September 4th, 2009 04:58 PM

All times are GMT -4. The time now is 12:59 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-28 in 0.08 seconds with 20 queries on phoenix via your IP