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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
153 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
89 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
133 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
128 views
1 like
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
107 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment