Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
EasyLanguage to NinjaScript
Collapse
X
-
is there anything special about the last bar on chart?
I have the 5 minute bar at the close as the last bar.
It shows on the chart.
it does not come through to the ninjascript OnBarUpdate ().
The test works on all prior days
-
I just find it amazing that there is no way of accessing the objects by name or index.
Leave a comment:
-
Hello,
If you have not assigned the ray to a variable, there would be no other way to access its instance other than to search for it or run a loop to find it.
From the questions, I could only see two ways of doing this. Either store the Ray as a variable when you create is as Patrick suggested:
IRay TL81 = DrawRay();
Later you would just use the variable name to call its properties: TL81
Otherwise if you did not create the ray and save that instance to a variable, you would need to loop through the objects to find it, an example of this can be found here: http://ninjatrader.com/support/forum...1&postcount=10
Please let me know if I may be of additional assistance.
Leave a comment:
-
I am suggesting using unique IRay object names for each. I think you just wish to loop through all draw objects and only change a value of a specific tag?
Leave a comment:
-
I would need a bit more context to the following: "So how could I search for say TL81 and assign it ?"
Is TL81 the IRay? So IRay TL81 = DrawRay();?
There should be no need to search for it, you have already assigned it by a name. Just call it's name:
TL81 = DrawRay(); // here you would change your settings
Leave a comment:
-
RobinT,
You would have to assign a IRay to every Ray you draw and then call them solely by their IRay object name given. You would not set them to IDrawObject.
Leave a comment:
-
This is a huge program already, you will never find your way around.
It simply creates a load of Rays with
IRay ray = DrawRay(tl_tag, false, dt_tl, tgtval, DateTime.Now , tgtval, tl_col, DashStyle.Dot , 2) ; }
else
ILine line = DrawLine(tl_tag, false, dt_tl, tgtval, dt_ed , tgtval, tl_col, DashStyle.Dot , 2) ; }
Then it tries to get them later with:
foreach (IDrawObject draw in DrawObjects )
{
if (draw.DrawType.ToString() == "Ray" )
{ //IRay ray = draw ;
Print (date.ToString() + " " + time.ToString() + " " + draw.Tag + " " + draw.DrawType ) ; }
}
but I cant seem to get the parameters into an accessible object. I want to change the color and style.
I have text objects in there as well.
}
Leave a comment:
-
RobinT,
I would try to tackle one item at a time. If you would like to tackle the code first please provide the full .cs file you are using and define what you wish to do in your response.
For the TradeStation symbols please write to platformsupport[at]ninjatrader[dot]com to set up a remote session.
Leave a comment:
-
I scoured the documentation and I can't see how to get a second dataseries from panel 2. In TS it's data2.
Leave a comment:
-
I can't believe this simple ts app is so difficult.
I draw some lines in the day and at the eod i just want to change their color and style.
have I chosen the wrong platform ?
Leave a comment:
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by kinfxhk, 07-14-2026, 09:39 AM
|
0 responses
128 views
0 likes
|
Last Post
by kinfxhk
07-14-2026, 09:39 AM
|
||
|
Started by kinfxhk, 07-13-2026, 10:18 AM
|
0 responses
105 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 10:18 AM
|
||
|
Started by kinfxhk, 07-13-2026, 09:50 AM
|
0 responses
86 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 09:50 AM
|
||
|
Started by kinfxhk, 07-13-2026, 07:21 AM
|
0 responses
105 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 07:21 AM
|
||
|
Started by kinfxhk, 07-11-2026, 02:11 AM
|
0 responses
86 views
0 likes
|
Last Post
by kinfxhk
07-11-2026, 02:11 AM
|

Leave a comment: