NexusFi: Find Your Edge


Home Menu

 





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 3,201 views
    2. thumb_up 1 thanks given
    3. group 4 followers
    1. forum 7 posts
    2. attach_file 0 attachments




 
Search this Thread

Need help for a very simple script for Ninja Trader

  #1 (permalink)
vgbouchet
Buenos Aires
 
Posts: 3 since Jun 2011
Thanks Given: 0
Thanks Received: 0

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

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Exit Strategy
NinjaTrader
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #2 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090

 
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
Thanked by:
  #3 (permalink)
vgbouchet
Buenos Aires
 
Posts: 3 since Jun 2011
Thanks Given: 0
Thanks Received: 0


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
  #4 (permalink)
 askerix 
Zurich Switzerland
 
Experience: None
Platform: NT
Trading: Ukulele
Frequency: Never
Duration: Never
Posts: 60 since Mar 2011
Thanks Given: 554
Thanks Received: 62

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
  #5 (permalink)
 wavey 
Germany / Italy
 
Experience: Advanced
Platform: NT8, TS, TV
Trading: Index Futures, FX
Posts: 83 since Nov 2009
Thanks Given: 51
Thanks Received: 37


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 - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

Reply With Quote
  #6 (permalink)
true777
USA
 
Posts: 6 since Aug 2010
Thanks Given: 0
Thanks Received: 0

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
  #7 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090


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
  #8 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,442 since Jun 2009
Thanks Given: 33,215
Thanks Received: 101,603

 
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 the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote




Last Updated on December 1, 2011


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts