How to draw more than 1 line in PricePanel? - NinjaTrader | futures io social day trading
futures io futures trading


How to draw more than 1 line in PricePanel?
Updated: Views / Replies:526 / 5
Created: by jaspee Attachments:0

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
 

How to draw more than 1 line in PricePanel?

  #1 (permalink)
Trading Apprentice
Czech Republic
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES
 
Posts: 3 since Mar 2012
Thanks: 3 given, 0 received

How to draw more than 1 line in PricePanel?

Hi,
Could somebody help me please? I'm trying to draw 2lines in PricePanel, see code sample, but only the last one always appear. I don't know what I'm doing wrong?
Many thanks for any idea how to do it.
jaspee

code sample:
 
Code
protected override void OnBarUpdate()
        {
            // Use this method for calculating your indicator values. Assign a value to each
            // plot below by replacing 'Close[0]' with your own formula.
            //Plot0.Set(Close[0]);
			
			int startBar = CurrentBar - Bars.GetBar (new DateTime (2015,2,12,19,27,00));
			int endBar  = CurrentBar - Bars.GetBar (new DateTime (2015,2,12,21,21,00));
			int deltaAgo = endBar - startBar;
			
			//DrawLine(string tag, int startBarsAgo, double startY, int endBarsAgo, double endY, Color color)
			
			if (CurrentBar > 20)
			{
			DrawOnPricePanel = true;
			//DrawLine("tagEntry",5,2082,0,2086,Color.Blue );
			DrawLine("tagEntry",true,new DateTime (2015,2,12,19,27,00),Open[startBar],new DateTime (2015,2,12,21,21,00),Close[endBar],Color.Blue ,DashStyle.Dash,3);
			
			DrawOnPricePanel = true;	
			DrawLine("tagEntry",true,new DateTime (2015,2,12,19,45,00),Open[startBar],new DateTime (2015,2,12,21,21,00),Close[endBar],Color.Blue ,DashStyle.Dash,3);
			
			DrawOnPricePanel = false;

Reply With Quote
 
  #2 (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

because you use identical tag name, you make them diff by giving diff name or the same tag name + some value ex: "tag name"+Currentbar, "tag name"+count, etc....

Reply With Quote
The following 2 users say Thank You to cory for this post:
 
  #3 (permalink)
Elite Member
Wrocław, Poland
 
Futures Experience: Intermediate
Platform: NinjaTrader, Racket
Favorite Futures: Ockham's razor
 
gregid's Avatar
 
Posts: 651 since Aug 2009
Thanks: 321 given, 605 received


Make sure tag is different for separate lines, eg:
"Line1Tag",
"Line2Tag"

If you don't want the lines to be overwritten at every bar and would like to keep every historical line visible you need also to add bar specific info to the tag, eg:
Time[0].ToString + "Line1Tag",
Time[0].ToString + "Line2Tag"

Reply With Quote
The following 2 users say Thank You to gregid for this post:
 
  #4 (permalink)
Trading Apprentice
Czech Republic
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES
 
Posts: 3 since Mar 2012
Thanks: 3 given, 0 received

to: cory, gregid
wow!! Thank you, ohh.. my eyes I completly non-see it, same Tags names..oops
Now it works ! Looks Great ! even without DrawOnPricePanel = true;

Could I ask one more drawing question please ?
I would like to draw circle with diameter 10pt with central point in same position as is actually mouse CrossCursor over the chart and when mouse cursor move, circle move it together with. Like circle will be drawn arround the cursor and move together as one. Such as gauge.
Many thanks for any idea.
jaspee

Reply With Quote
 
  #5 (permalink)
Elite Member
Wrocław, Poland
 
Futures Experience: Intermediate
Platform: NinjaTrader, Racket
Favorite Futures: Ockham's razor
 
gregid's Avatar
 
Posts: 651 since Aug 2009
Thanks: 321 given, 605 received


jaspee View Post
to: cory, gregid
Could I ask one more drawing question please ?
I would like to draw circle with diameter 10pt with central point in same position as is actually mouse CrossCursor over the chart and when mouse cursor move, circle move it together with. Like circle will be drawn arround the cursor and move together as one. Such as gauge.
Many thanks for any idea.
jaspee

If you are good at programming you should be able to get the idea of what needs to be done by looking at existing tools in the download section, like crosshair gauge:
https://futures.io/local_links_search.php?action=show&literal=1&search=crosshair&desc=1&keys=1

Alternatively try to ask in the following thread:
https://futures.io/elite-circle/1261-want-your-ninjatrader-indicator-created-free.html

I believe you need to be elite member to access both.

Reply With Quote
The following user says Thank You to gregid for this post:
 
  #6 (permalink)
Trading Apprentice
Czech Republic
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES
 
Posts: 3 since Mar 2012
Thanks: 3 given, 0 received

to: gregid
Thank you for your time and both links.
Unfortunatelly I'm not elite member..:-(
jaspee

Reply With Quote

Reply



futures io > > > > How to draw more than 1 line in PricePanel?

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
Get all draw objects dimkdimk NinjaTrader Programming 18 February 14th, 2015 12:46 PM
How to Fill in the Space between the CCI Value Line and the Zero Line jdrower Sierra Chart Programming 5 January 23rd, 2014 10:00 AM
Help How to draw a line segment sburtt NinjaTrader Programming 1 February 14th, 2013 10:05 AM
Draw a line patbateman NinjaTrader 6 December 27th, 2012 02:22 PM
Emboldened by Election, Democrats Draw New Line Quick Summary News and Current Events 0 November 17th, 2012 06:30 PM


All times are GMT -4. The time now is 06:46 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.08 seconds with 19 queries on phoenix via your IP 54.145.16.43