Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
EasyLanguage to NinjaScript
Collapse
X
-
I'll try that.
Out of interest I am only using Historical Data. I have got one minute charts from TradeStation and I am using five minute bars.I have tried adding a dummy bar at the end of the data but that didnt work.
-
Hello RobinT,
You could compare the current bar timestamp (using CalculatOnBarClose = false) against the Session End. You can use GetNextBeginEnd to do so: http://ninjatrader.com/support/helpG...xtbeginend.htm
Leave a comment:
-
so my question remains, How do you ever get the session close on the most recent bar ? How would you ever get daily stock closes ?
Leave a comment:
-
The last bar of the chart will not technically close until the opening tick of the next bar and therefore you could not retrieve it by calling Close before the open of the next session.Originally posted by RobinT View PostThanks, investigating.
I use CalculateOnBarClose = true
and the problem is i am not getting an OnBarUpdate on the last bar on chart.
Leave a comment:
-
DrawText("Unf1", false, "l", 0, value15, 0, Color.White, new Font("Wingdings", 8),
StringAlignment.Center, Color.Transparent, Color.White, 0);
did the trick. Thanks
Leave a comment:
-
Thanks, investigating.
I use CalculateOnBarClose = true
and the problem is i am not getting an OnBarUpdate on the last bar on chart.
Leave a comment:
-
When the OnBarUpdate() event occurs with CalculateOnBarClose = true, that will be the moment the close occurred. So you could just call Time[0] in OnBarUpdate().Originally posted by RobinT View PostOK< I understand.
Is the a way of detecting the close of in instrument at the close time.
If you are using CalculateOnBarClose = false, you could use FirstTickOfBar and then TIme[1]. For example: http://ninjatrader.com/support/forum...ad.php?t=19387
There is no means to change the outline color of the Dot. You may instead wish to use DrawText with WingDings: http://ninjatrader.com/support/forum...ad.php?t=70299Originally posted by RobinT View Postcan anyone help me with changing the appearance of the dot object. I can draw a dot but it has a certain style. How do I change the style and size. I am using:
DrawDot("AMBuy", false, value40, value49, Color.Green ) ;
I get a green dot with a white border.
Please let me know if you have any questions.
Leave a comment:
-
I was reading around the plotting subject and I found an indicator called SmaRSIV6.cs.
Looking into it I found:
DrawHorizontalGridLines = true;
DrawVerticalGridLines = true;
and
using NinjaTrader.NinjaScript;
using NinjaTrader.NinjaScript.DrawingTools;
none of these are supported in the compiler.
Also, this was no help with dot drawing.
Leave a comment:
-
can anyone help me with changing the appearance of the dot object. I can draw a dot but it has a certain style. How do I change the style and size. I am using:
DrawDot("AMBuy", false, value40, value49, Color.Green ) ;
I get a green dot with a white border.
Leave a comment:
-
OK< I understand.
Is the a way of detecting the close of in instrument at the close time.
Leave a comment:
-
Hello,
Thank you for the reply.
Yes this would be expected as I had explained, If you are using COBC == true, you would need to wait for a new tick to close that bar. If this is the last bar on the chart and there is no tick after that bar in the session to close it, it would remain as the building bar.
With COBC == true the right most bar will always be the Building bar and the 0 bars ago or Close[0] would refer to the bar one position left of that bar or the last closed bar.
I look forward to being of further assistance.
Leave a comment:
-
My NS did not state CBOC so it would be true by default.
My chart is historical and it shows the full bar with the correct close on the chart. It is also the close of the session ie 4pm EST. The software works when it is not the last bar but does not work when it isthe last bar.
Leave a comment:
-
Hello,
Thank you for the reply, I am glad you had resolved your question.
Regarding the last bar, if you are using COBC == true, you would need to wait for a tick to close that bar, if this is the last bar of the session this would be expected as there is no other data after that to close the final bar.
In the case you are using COBC == false and receive a tick, it would report as closed in that case but only if a tick is received that would close the bar.
Please let me know if I may be of further assistance.
Leave a comment:
-
I have put all my rays in an array so I can choose them at will and get set params. works ok.
problem solved.
any idea about lastbar ?
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: