Programming an entry in script - NinjaTrader Programming | futures trading

Go Back

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

Programming an entry in script
Started:October 8th, 2015 (01:13 PM) by deandavis Views / Replies:145 / 2
Last Reply:October 11th, 2015 (05:08 AM) 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

Programming an entry in script

Old October 8th, 2015, 01:13 PM   #1 (permalink)
Elite Member
Poulsbo, Wa US
Futures Experience: Intermediate
Platform: NinjaTraderm Tradestation
Broker/Data: Ninja Trader, Continuum
Favorite Futures: ES, CL
deandavis's Avatar
Posts: 11 since Jul 2010
Thanks: 22 given, 0 received

Programming an entry in script

I am using Renko bars in Ninja Trader 7. Is possible to write code that will, based on a signal from my indicator, have a stop limit order entered at the current bar close plus x tics over or under depending if I want a long or short entry? My objective is to only enter positions on the bar after the signal if the price continues in the direction of the trade. Thanks in Advance.

Reply With Quote

Old October 8th, 2015, 01:13 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 October 11th, 2015, 05:08 AM   #3 (permalink)
Membership Temporarily Revoked
Futures Experience: Advanced
Platform: NinjaTrader 7
Broker/Data: Rithmic, CQG
Favorite Futures: CL, 6C
Posts: 6 since Dec 2014
Thanks: 0 given, 2 received

use strategy wizard. than change or add some code

   AddPeriod( PeriodType.Range, 1);


   if (BarsInProgress == 1) { // last price changed by 1 tick
      double lastRenkoClose = Closes[0][0];  // primary dataserie last bar close
      double lastRenkoOpen = Opens[0][0];
      if (lastRenkoClose > lastRenkoOpen) {  // up bar
         if (Close[0] >= lastRenkoClose + OpenRangeTicks * TickSize) {  // check open long 
            // open long
      } else {  // down bar
        if (Close[0] <= lastRenkoClose - OpenRangeTicks * TickSize) {  // check open short 
            // open short
      } // else

Reply With Quote

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > Programming an entry in script

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
Ninja Script programming errors AlexBTrader NinjaTrader 3 August 9th, 2016 11:21 AM
Programming with NinjaTrader script Wolfgang NinjaTrader Programming 4 February 25th, 2014 11:11 AM
NT Programming Question - Avoiding Re-entry? Fibbee NinjaTrader 5 January 11th, 2013 03:49 AM
Ninja script - learning code + programming alias NinjaTrader Programming 20 May 11th, 2011 05:01 AM
Programming errors while importing Ninja script emini_Holy_Grail NinjaTrader Programming 8 May 20th, 2010 03:09 AM

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