NexusFi: Find Your Edge


Home Menu

 





how to overload DrwTrendLine.Create() (initial thoughts inside)


Discussion in MultiCharts

Updated
    1. trending_up 1,148 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 0 posts
    2. attach_file 0 attachments




 
Search this Thread

how to overload DrwTrendLine.Create() (initial thoughts inside)

  #1 (permalink)
 gztanwei 
toronto
 
Experience: Beginner
Platform: NinjaTrader
Posts: 33 since Sep 2009
Thanks Given: 3
Thanks Received: 11

Hi firstly my programming skill is only half-baked. So just to share some thought and hope to make the tool easier to program.

reference to: 4.3 Plotting on the Chart - MultiCharts

I think naturally people would care the appearance of the trendline created, so it would be more sensible to have DrwTrendLine.Create() to specify all parameters of the trendline when it is created, in one step.

I have written below code snippet, but not sure how to overload it in public. Could you teach me how?

Thanks.

 
Code
		ITrendLineObject Create(ChartPoint begin, ChartPoint end, Color? color=null, 
			int size=0, ETLStyle style=ETLStyle.ToolSolid, bool extLeft=false, bool extRight=false)
		{
			ITrendLineObject _TL = DrwTrendLine.Create(begin,end);
			_TL.Color=color ?? Color.Blue;
			_TL.Size=size;
			_TL.Style=style;
			_TL.ExtLeft=extLeft;
			_TL.ExtRight=extRight;
			return _TL;
			
		}

Started this thread Reply With Quote




Last Updated on September 3, 2015


© 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