indicator will not plot - NinjaTrader | futures io social day trading
futures io futures trading


indicator will not plot
Updated: Views / Replies:663 / 5
Created: by MilfordT Attachments:3

Welcome to futures io.

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

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • 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.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

indicator will not plot

  #1 (permalink)
Trading Apprentice
Dallas, Texas
 
Futures Experience: Advanced
Platform: NinjaTrader
Favorite Futures: EUR/USD
 
Posts: 2 since Aug 2012
Thanks: 0 given, 0 received

indicator will not plot

Hi I'm fairly new to NT and so am not good at it as you may have surmised from the title.

I made an indicator starting with the wizard to plot a dot at the High of Up bars or the Low of Down bars when the percentage of a bars body is <= 49%

I have wasted a few hours trying different things to get it to work.

Attached is a picture of my code and of the Settings.
Please ignore the NumCdls input as that is not being used.

Any help will be greatly appreciated.

Milford.

Attached Thumbnails
indicator will not plot-code-pic.png   indicator will not plot-indicator-settings.png   indicator will not plot-data-series.png  
Reply With Quote
 
  #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.

 
  #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: 46,240 since Jun 2009
Thanks: 29,354 given, 83,237 received


You aren't testing for CurrentBar > 1 first. If you check the Log, it will tell you as much.

Mike

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.
6)
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
 
  #4 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,602 received
Forum Reputation: Legendary

I think you will run into 3 problems:


(1) For the first bar of your chart, which is CurrentBar = 0, you cannot access Close[1] or Open[1], because it does not exist. Therefore, you need insert a line in the beginning of OnBarUpdate()


 
Code
if(CurrentBar < 1) 
   return;

(2) There are bars that have a zero range when high = low. In that case you will run into a division by zero problem, which you need to exclude.

(3) Rather than using the Plot method to place a dot above or below the current bar, I would use the NinjaScript method DrawDot(), which allows you draw a margin above the high or below the low. If you use the Plot method, you may get unwanted dots, even if you have set no values to the plot.

Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
  #5 (permalink)
Trading Apprentice
Dallas, Texas
 
Futures Experience: Advanced
Platform: NinjaTrader
Favorite Futures: EUR/USD
 
Posts: 2 since Aug 2012
Thanks: 0 given, 0 received


Fat Tails View Post
I think you will run into 3 problems:


(1) For the first bar of your chart, which is CurrentBar = 0, you cannot access Close[1] or Open[1], because it does not exist. Therefore, you need insert a line in the beginning of OnBarUpdate()


 
Code
if(CurrentBar < 1) 
   return;

(2) There are bars that have a zero range when high = low. In that case you will run into a division by zero problem, which you need to exclude.

(3) Rather than using the Plot method to place a dot above or below the current bar, I would use the NinjaScript method DrawDot(), which allows you draw a margin above the high or below the low. If you use the Plot method, you may get unwanted dots, even if you have set no values to the plot.

Thank you so much for this quick reply.
I am now doing the CurrentBar check, making sure I don't divide by zero, and am using DrawDot.
It is now working like champ!

Also discovered where log is! Guess I was pretty much flying blind

Should of come around sooner and saved a few hours

thanks again.

Milford

Reply With Quote
 
  #6 (permalink)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,220 since Jun 2009
Thanks: 628 given, 6,318 received
Forum Reputation: Legendary


MilfordT View Post
Thank you so much for this quick reply.
I am now doing the CurrentBar check, making sure I don't divide by zero, and am using DrawDot.
It is now working like champ!

Also discovered where log is! Guess I was pretty much flying blind

Should of come around sooner and saved a few hours

thanks again.

Milford

use plot but if you dont want to see it you can plot Plot0.Reset.

Reply With Quote

Reply



futures io > > > > indicator will not plot

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
deltaema indicator will not plot aligator The Elite Circle 50 March 6th, 2014 08:36 PM
Shifting an indicator plot? jordis NinjaTrader Programming 6 January 30th, 2013 09:34 PM
plot the open of an indicator (not price) patbateman NinjaTrader 3 July 1st, 2012 12:06 PM
Accessing Plot Values from another Indicator sniffy NinjaTrader Programming 3 March 17th, 2012 10:09 PM
Indicator plot syntax pequemec NinjaTrader Programming 4 August 30th, 2011 03:06 AM


All times are GMT -4. The time now is 04:50 PM.

Copyright © 2017 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
Page generated 2017-12-16 in 0.10 seconds with 20 queries on phoenix via your IP 54.163.210.170