Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Automatic Trend Line Detection and Alert
Collapse
X
-
Hi Mike, you can send the code you use to support at ninjatrader dot com to my Attn, so I can take a look - thanks.
Leave a comment:
-
Thanks Bertrand
I have CalculateOnBarClose is set to false, and I wait a 2 or 3 tick and after that one TL is moving and the current one is locked.
is any way to load the code or send it for you.
I run NT 7/17
Thanks for helping
Mike
Leave a comment:
-
Mike, if you are using CalculateOnBarClose = true, you will have to wait until the most current bar is completed (or for a new bar to start, it is the same event) before the current trend line will be unlocked.
If CalculateOnBarClose is set to false, you will just have to wait for the next tick to come in before the trend line will be unlocked.
Leave a comment:
-
Thanks Bertrand
I view the code again but I didn't find anything related to unlock, Do I missing anything.
Thanks
Mike
Leave a comment:
-
Mike,
In your code you will need to set the lock property for the object to false.
Please see the example here: http://www.ninjatrader.com/support/h...drawobject.htm
Leave a comment:
-
This a little video explain what happend
Thanks
Leave a comment:
-
Thanks Bertrand
Yes I add on # 51.
I attach a copy of the code, I may missing something, thanks for help me.
if you don't mind would you please check it.
Thanks
Mike
Sorry it deosn't let me attach the full code here but if I get you email I will email it to you
///<summary>
/// This method is used to configure the indicator and is called once before any bar data is loaded.
///</summary>
protectedoverridevoid Initialize()
{
DisplayInDataBox = false;
CalculateOnBarClose = true;
Overlay = true;
PriceTypeSupported = false;
}
///<summary>
/// Called on each bar update event (incoming tick)
///</summary>
protectedoverridevoid OnBarUpdate()
{
// Loops through the DrawObjects collection
foreach (IDrawObject draw in DrawObjects)
{
// Unlocks all draw objects for manual manipulation on the chart
draw.Locked = false;
}
// Calculate up trend line
int upTrendStartBarsAgo = 0;
int upTrendEndBarsAgo = 0;
int upTrendOccurence = 1;
while (Low[upTrendEndBarsAgo] <= Low[upTrendStartBarsAgo])
Leave a comment:
-
Sorry don't follow you, if I apply this on the code I referenced on # 51 I see one current ray drawn and it's unlocked i.e. freely movable then after this snippet is added.
Leave a comment:
-
Thanks Bertrand
I did that and I have been able to move the past TL not the current one??
Thanks Again
Mike
Leave a comment:
-
Sorry Mike, to unlock the drawn objects, you can set locked to false programmatically with this snippet here in the OnBarUpdate() code portion - http://www.ninjatrader.com/support/h...drawobject.htm
Leave a comment:
-
Thanks Bertrand
I try this and it is not working on calculate on bar close false or true.
just I want be able to move the TL in Auto Trendline indicator by the mouse.
Thanks
Mike
Leave a comment:
-
Try adding this below to Initialize() -
Code:AllowRemovalOfDrawObjects = true;
Leave a comment:
-
lock off
Hi Bertrand
Regarding this code, What I have to do to unlock the trend line just in case. I try to move it and give me a red lock sign, I try to save it as unlock but it is going back next tick to be locked.
Thanks
Mike
Leave a comment:
-
Mike, I believe some people can and are indeed able to import auto trendline file into NT7 Beta....at least that is my understanding...
Leave a comment:
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Tim-c, Today, 08:36 AM
|
1 response
2 views
0 likes
|
Last Post Today, 08:45 AM | ||
Started by goodknight777, Today, 08:43 AM
|
0 responses
1 view
0 likes
|
Last Post Today, 08:43 AM | ||
Started by martini, Yesterday, 04:45 PM
|
3 responses
27 views
0 likes
|
Last Post Today, 08:38 AM | ||
Started by Mestor, Today, 03:15 AM
|
2 responses
10 views
0 likes
|
Last Post
by Mestor
Today, 08:36 AM
|
||
Started by roblogic, 11-30-2023, 06:20 PM
|
57 responses
1,364 views
0 likes
|
Last Post
by playr101
Today, 08:35 AM
|
Leave a comment: