Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Can this be done?
Collapse
X
-
all rectangles extend
Thanks Bertrand, here's the code I've been trying...Originally posted by NinjaTrader_Bertrand View Postcoolmoss, you would use the .StartY property of your IRectangle object then :
http://www.ninjatrader.com/support/h...irectangle.htm
This code causes ALL the rectangles to extend far right. I just want the rectangles with a StartY value greater than the current bar's high to extend right.Code:if (draw.Tag.Contains("myRec")) { IRectangle Extend = (IRectangle) draw; Print(Extend.StartY); if (Extend.StartY>High[1]) { Extend.EndBarsAgo = 0; } }
If I comment out the above code, the correct rectangles plot. Also, I have the print statement to determine if the StartY values are what I'm expecting, and they are.
I'm guessing my ignorance is causing a stupid error of some sort.
Comment
-
I thought I was checking for specific ones with this line:Originally posted by NinjaTrader_Bertrand View PostFor this would trigger on all rectangles, you don't check for any specific ones just the ones containing the myRec tag - while infact your create multiple ones by adding those with a unique tag per your condition posted lower.
if (Extend.StartY>=High[0])
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
567 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
330 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
548 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
548 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment