Creating Arrows - NinjaTrader Programming | futures trading

Go Back

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

Creating Arrows
Started:October 14th, 2009 (08:16 PM) by spinnybobo Views / Replies:4,005 / 3
Last Reply:October 15th, 2009 (09:45 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

Creating Arrows

Old October 14th, 2009, 08:16 PM   #1 (permalink)
Elite Member
Crete, IL/USA
Futures Experience: Intermediate
Platform: NinjaTrader, Mt4
Broker/Data: Tradestation/Tradestation, NinjaTrader, FXCM and Tallinex
Favorite Futures: ES, CL, EUR/USD, TF
spinnybobo's Avatar
Posts: 171 since Aug 2009
Thanks: 99 given, 47 received

Creating Arrows

Hi Everybody

I am just a beginner in programming. I am currently taking a C++ class and I know Ninjatrader is in C# lanuage. So, it will take me a while before I am able to start playing with Ninjascript in terms of creating my own indicators.

The thing I did want to create were some arrows, and I think I can do this with the strategy builder in Ninja trader.

HOWEVER. When I input all of my user defined inputs and my conditions (ie if this happens and this happens, etc..----DO the Following)

I am having a problem with Do the Following. I dont want to create a long trade or short trade. I just want to play a sound and give an arrow. When I just say under Do the Following: play this sound, etc. give Up arrow, etc.. It prints out nothing on the chart!

I dont understand why it prints out nothing on the chart since it is supposed to because it gives the option to do so. Then, when I just say Go Long or Go Short, for example, it works.

So, I guess I could generate my arrows this way since I am only trading on sim, however, my questions are this:
1. Is it possible to just let it go long and short on sim while I also run it on Live? I dont want to take every trade, I just want some arrows to give me a heads up to Pay Attention, my setup is here.

2. Is it possible to generate just the arrows without putting on a long or short position using the strategy builder?

My other option is to use the Indicator builder, but this does not have any videos that I can find, and it is not very intuitive----does not have the same setup as strategy builder which is very logical.


Reply With Quote

Old October 14th, 2009, 08:38 PM   #2 (permalink)
Elite Member
Futures Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 798 since Jun 2009
Thanks: 109 given, 784 received

Try this for ideas in your "go long" actions ;
DrawArrowUp("My up arrow" CurrentBarfalse0Low[0]+(-4*TickSize), Color.Lime);
PlaySound(@"C:\Program Files\NinjaTrader 6.5\sounds\Long ZN.wav");

Remeber to change the name of the wav file to one appropraite for your machine.

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

Old October 15th, 2009, 03:18 AM   #3 (permalink)
Elite Member
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: FGBL 6E B4
max-td's Avatar
Posts: 1,754 since Jun 2009
Thanks: 2,309 given, 911 received

hi spinnybobo,
thanks for bringing up this question in a thread !

here some more stuff for bringing Arrows in your chart - but these things have to be adjusted best in an open code - dont know how flexible the strategy-builder / wizard is.

For painting arrows you do NOT need a strategy - you can build an indicator that for. if you insert a stratetgy in your chart just for visualisation of arrows you have some limitations like not being able to use charttrader anymore or watch your trades there.

as an indicator with your conditions inside, it shows you the arrows when the conditions are vaild + you can decide if you trade or not - you dont need buy/sell-order stuff.


// Paints a red down arrow on the current bar 1 tick above the high 
DrawArrowDown("tag1"true0High[0] + TickSizeColor.Red);

// Paints a blue down arrown on a three bar reversal pattern (see image below) 

if (High[2] > High[3] && High[1] > High[2] && Close[0] < Open[0]) 

DrawArrowDown(CurrentBar.ToString(), true0High[0] + TickSizeColor.Blue); 


DrawArrowUp(stringtag, bool autoScale, int barsAgo, double y, Color color)

A user defined unique id used to reference the draw object. For example, if you pass in a value of "myTag", each time this tag is used, the same draw object is modified. If unique tags are used each time, a new draw object will be created each time.

Determines if the draw object will be included in the y-axis scale

The bar the object will be drawn at. A value of 10 would be 10 bars ago.

The y value where the arrow is painted (iE 3 ticks above the High of the Bar [0] )


Reply With Quote
The following 4 users say Thank You to max-td for this post:

Old October 15th, 2009, 09:45 AM   #4 (permalink)
Elite Member
Arcata, CA
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: index futures, oil
Saroj's Avatar
Posts: 482 since Jun 2009
Thanks: 223 given, 379 received

max wrote: "as an indicator with your conditions inside, it shows you the arrows when the conditions are vaild + you can decide if you trade or not - you dont need buy/sell-order stuff."

Since the indicator wizard is so lame, I sometimes use the strategy wizard (not often because it is pretty lame too and fraught with bugs) to create the logic and then create a new indicator via the Control Center and cut and past the strategy code into the indicator (but you have to change the namespace to "NinjaTrader.Indicator" (sans quotes)...

I assume this is o.k. to do, but if someone knows differently, please post.

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

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > Creating Arrows

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
DoubleMAPaint with sound arrows... sam028 NinjaTrader Programming 68 December 13th, 2013 09:56 PM
NT7 Better Arrows and Other Symbols hunter548 NinjaTrader Programming 2 March 10th, 2011 10:22 AM
MACD Arrows - glitch Slipknot511 NinjaTrader Programming 9 November 19th, 2010 08:31 PM
Arrows Peter NinjaTrader Programming 6 June 15th, 2009 09:19 AM

All times are GMT -4. The time now is 12:23 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-26 in 0.09 seconds with 19 queries on phoenix via your IP