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



How to draw more than 1 line in PricePanel?


Discussion in NinjaTrader

Updated
    1. trending_up 947 views
    2. thumb_up 5 thanks given
    3. group 3 followers
    1. forum 5 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
 

How to draw more than 1 line in PricePanel?

(login for full post details)
  #1 (permalink)
Czech Republic
 
 
Posts: 3 since Mar 2012
Thanks: 3 given, 0 received

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

Can you help answer these questions
from other members on futures io?
Work with historical tcks data on MUltichart NET PowerLa …
MultiCharts
COTbase for quant trading?
Elite Algorithmic NinjaTrader Trading
Neurological explanations for trading Success
Psychology and Money Management
NT8 indicator to simulate a Funding Evaluation where to …
NinjaTrader
What blockvolume is visible? - order processing
NinjaTrader
 
 
(login for full post details)
  #2 (permalink)
the coin hunter
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
 
cory's Avatar
 
Posts: 6,030 since Jun 2009
Thanks: 845 given, 7,894 received

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:
 
(login for full post details)
  #3 (permalink)
Wrocław, Poland
 
Experience: Intermediate
Platform: NinjaTrader, Racket
Trading: Ockham's razor
 
gregid's Avatar
 
Posts: 651 since Aug 2009
Thanks: 320 given, 620 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:
 
(login for full post details)
  #4 (permalink)
Czech Republic
 
 
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
 
(login for full post details)
  #5 (permalink)
Wrocław, Poland
 
Experience: Intermediate
Platform: NinjaTrader, Racket
Trading: Ockham's razor
 
gregid's Avatar
 
Posts: 651 since Aug 2009
Thanks: 320 given, 620 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:


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:
 
(login for full post details)
  #6 (permalink)
Czech Republic
 
 
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


futures io Trading Community Platforms and Indicators NinjaTrader > How to draw more than 1 line in PricePanel?


Last Updated on February 19, 2015


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



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