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 CaptainJack, 05-29-2026, 05:09 AM
|
0 responses
245 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 05:09 AM
|
||
|
Started by CaptainJack, 05-29-2026, 12:02 AM
|
0 responses
157 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 12:02 AM
|
||
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
165 views
1 like
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
250 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
201 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|

Comment