Need help for a very simple script for Ninja Trader - futures io
futures io



Need help for a very simple script for Ninja Trader


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one cory with 2 posts (1 thanks)
    2. looks_two vgbouchet with 2 posts (0 thanks)
    3. looks_3 Big Mike with 1 posts (0 thanks)
    4. looks_4 wavey with 1 posts (0 thanks)
    1. trending_up 2,540 views
    2. thumb_up 1 thanks given
    3. group 4 followers
    1. forum 7 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Need help for a very simple script for Ninja Trader

(login for full post details)
  #1 (permalink)
vgbouchet
Buenos Aires
 
 
Posts: 3 since Jun 2011
Thanks: 0 given, 0 received

Hello everybody,

I would like to know if you can help me with a very simple indicator I want in NinjaTrader.
If current bar closes bearish and previous bar closes bullish then plot a red dot above current bar. If current bar closes bullish and previous bar closes bearish then plot a green dot below current bar.

It is very simple to explain it but I'm getting mad to do it...

Any help will be very much appreciated...

Thank you very much in advance.

Regards,

Victor

Reply With Quote

Journal Challenge April 2021 results (now extended!):
Competing for $1800 in prizes from Jigsaw
looks_oneMaking a Living with the Microsby sstheo
(79 thanks from 10 posts)
looks_twoSalao's Journalby Salao
(23 thanks from 5 posts)
looks_3Deetee’s DAX Trading Journal (time based)by Deetee
(15 thanks from 8 posts)
looks_4Learning to Profit - A journey in algorithms and optionsby Syntax
(12 thanks from 7 posts)
looks_5Rogue MNQ 2/21 Journeyby RogueJoules
(0 thanks from 2 posts)
 
Best Threads (Most Thanked)
in the last 7 days on futures io
The Crude Dude Oil Trading System
73 thanks
futures io site changelog and issues/problem reporting
71 thanks
Would You Sell Your System?
65 thanks
FIO Journal Challenge - April 2021 w/Jigsaw Trading
30 thanks
Big Mike in Ecuador
25 thanks
 
(login for full post details)
  #2 (permalink)
 cory 
the coin hunter
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
 
cory's Avatar
 
Posts: 6,041 since Jun 2009
Thanks: 854 given, 7,910 received

 
Code
if ( Close[0] > Open[0] && Close[1] < Open[1] )                             // Note: [0] =currentbar, [1] =previous bar
   DrawDot("tag1", true, 0, Low[0] - TickSize, Color.Red);
from ninja manual
NinjaTrader Version 7

Reply With Quote
The following user says Thank You to cory for this post:
 
(login for full post details)
  #3 (permalink)
vgbouchet
Buenos Aires
 
 
Posts: 3 since Jun 2011
Thanks: 0 given, 0 received


Hi Cory!

Thank you very much for your quick answer and happy Thanksgiving Day!

I included your formula but it is ploted only on last bar...Do you know how to make the indicator be ploted on every other situation where this condition is met along the chart?

Thank you very much again!

Regards,

Victor

Reply With Quote
 
(login for full post details)
  #4 (permalink)
 askerix 
Switzerland
 
Experience: None
Platform: NT
Trading: Ukulele
 
Posts: 40 since Mar 2011
Thanks: 443 given, 40 received

Hi Victor,

as described in the documentation you have to use a unique identifier for the "tag" otherwise the object will be moved to the new location.
mostly you use something like "mydots"+CurrentBar to make the occurence unique.

Reply With Quote
 
(login for full post details)
  #5 (permalink)
 wavey 
Germany / Italy
 
Experience: Advanced
Platform: a few...
Trading: all that move nicely, extend your horizons
 
Posts: 68 since Nov 2009
Thanks: 46 given, 32 received


vgbouchet View Post
Hi Cory!

Thank you very much for your quick answer and happy Thanksgiving Day!

I included your formula but it is ploted only on last bar...Do you know how to make the indicator be ploted on every other situation where this condition is met along the chart?

Thank you very much again!

Regards,

Victor

You may find this NT thread here informative, I know I did in my beginnings

Indicator: Drawing unique objects and objects that update - NinjaTrader Support Forum

Reply With Quote
 
(login for full post details)
  #6 (permalink)
true777
USA
 
 
Posts: 6 since Aug 2010
Thanks: 0 given, 0 received

I trade a 3min chart. I'd like to have an alarm go off when stochs closes above 50 AND above a designated price. Needs to be on bar close. Ninja has a standard "price alert" indy and I can set an alarm for stochs separately as well, but I need to be able to combine them and use them to filter each other. Feel like it would be pretty simple if someone wants to lend a hand =)

Reply With Quote
 
(login for full post details)
  #7 (permalink)
 cory 
the coin hunter
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
 
cory's Avatar
 
Posts: 6,041 since Jun 2009
Thanks: 854 given, 7,910 received


vgbouchet View Post
Hi Cory!

Thank you very much for your quick answer and happy Thanksgiving Day!

I included your formula but it is ploted only on last bar...Do you know how to make the indicator be ploted on every other situation where this condition is met along the chart?

Thank you very much again!

Regards,

Victor

then you have to use plot to draw series of dot and if it doesn't meet displaying criteria color it transparent.

sample coding

Reply With Quote
 
(login for full post details)
  #8 (permalink)
 Big Mike 
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: Custom solution
Trading: Futures & Crypto
 
Big Mike's Avatar
 
Posts: 49,960 since Jun 2009
Thanks: 32,433 given, 98,154 received

 
Thread Moved


Moved to NinjaTrader Programming



When creating a new thread, note which subforum you are in. Here is a short list of suggestions:

- Topic: Anything to do with an Elite indicator -> Subforum: The Elite Circle
- Topic: Looking for an existing indicator, or how-to use an indicator -> Subforum: (the platform)
- Topic: Programmer needing help with non-Elite indicator -> Subforum: (the platform) - Programming
- Topic: Want an indicator created/modified -> Reply to "Want indicator created free" in Elite Circle
- Topic: Vendors (trading rooms, commercial indicators) -> Subforum: Vendors/Product Reviews
- Topic: Discussion of Forex or Currency trading -> Subforum: Forex and Currency Trading
- Topic: Journals of your trading -> Subforum: Trading Journals or Elite Trading Journals
- Topic: General trading related discussions -> Subforum: Traders Hideout
- Topic: Discussion of a trading method -> Subforum: Traders Hideout
- Topic: Automated Trading -> Subforum: Elite Automated Trading

Last, any Elite Member may create more or less any of these topics in The Elite Circle at your own discretion (your support is appreciated).

This is just a short general list and doesn't cover everything. If you are unsure where to create your new thread, just create it in Traders Hideout and a moderator will move it if necessary.

-- Big Mike Trading


We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/

Visit other sites? Please spread the word about your experience with our community!
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > Need help for a very simple script for Ninja Trader


Last Updated on December 1, 2011


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Journal Challenge w/$1,800 in prizes!

April
 

Seven Trading Mistakes Solved With Smart Trading Tools w/Brannigan Barrett

Elite only
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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