How to extend the end point of a line drawn with DrawLine - futures io
futures io futures trading



How to extend the end point of a line drawn with DrawLine


Discussion in NinjaTrader

Updated
    1. trending_up 949 views
    2. thumb_up 1 thanks given
    3. group 1 followers
    1. forum 2 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 extend the end point of a line drawn with DrawLine

(login for full post details)
  #1 (permalink)
Philadelphia PA
 
Experience: Intermediate
Platform: ts
Trading: es
 
Posts: 5 since Feb 2011
Thanks: 2 given, 1 received

On each new bar I check for a condition and if true I start a new line
also on each new bar I extend any previous lines

protected override void OnBarUpdate()
{
if (CurrentBar != previousBar)
{
if (somecondition)
{
DrawLine(tag, true, 0, price, 0, price, Color.Green, DashStyle.Dash, 3);
}

foreach (IDrawObject o in DrawObjects)
{
ILine line = o as ILine;
if (line != null) line.EndBarsAgo = 0;
// if (line != null) line.EndTime = Time[0];
}
.
.
.
previousBar = CurrentBar; // previousBar is an instance class variable
}
}

This works up to a certain point but then after that point the lines stop extending.
Is this a bug in Ninja Trader? Do I need to set line.EndTime = Time[0] instead of or in addition to line.EndBarsAgo = 0?

Thanks

Started this thread 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
ZigZag with Depth and Backstep
EasyLanguage Programming
What blockvolume is visible? - order processing
NinjaTrader
Help Needed: TOS Options Chain IV & IMPL MOVE Calcul …
ThinkOrSwim
Neurological explanations for trading Success
Psychology and Money Management
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Battlestations: Show us your trading desks!
137 thanks
Big Mike in Ecuador
34 thanks
Want your NinjaTrader indicator created, free?
32 thanks
Saturday Morning Market Replay!
20 thanks
Selling Options on Futures?
19 thanks
 
(login for full post details)
  #3 (permalink)
Birmingham UK
 
Experience: Intermediate
Platform: NinjaTrader
Broker: TST/Rithmic
Trading: YM/Gold
 
ratfink's Avatar
 
Posts: 3,651 since Dec 2012
Thanks: 17,422 given, 8,403 received



trader789 View Post
This works up to a certain point but then after that point the lines stop extending.
Is this a bug in Ninja Trader? Do I need to set line.EndTime = Time[0] instead of or in addition to line.EndBarsAgo = 0?

Thanks

Any reason why you can't use 'DrawRay' ? Only need to draw each one once then.

Travel Well
Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to ratfink for this post:


futures io Trading Community Platforms and Indicators NinjaTrader > How to extend the end point of a line drawn with DrawLine


Last Updated on December 22, 2014


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