Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

EasyLanguage to NinjaScript

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • RobinT
    replied
    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.

    Leave a comment:


  • NinjaTrader_PatrickH
    replied
    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:


  • RobinT
    replied
    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:


  • NinjaTrader_PatrickH
    replied
    Originally posted by RobinT View Post
    Thanks, investigating.

    I use CalculateOnBarClose = true

    and the problem is i am not getting an OnBarUpdate on the last bar on chart.
    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.

    Leave a comment:


  • RobinT
    replied
    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:


  • RobinT
    replied
    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:


  • NinjaTrader_PatrickH
    replied
    Originally posted by RobinT View Post
    OK< I understand.

    Is the a way of detecting the close of in instrument at the close time.
    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().
    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
    Originally posted by RobinT View Post
    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.
    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=70299

    Please let me know if you have any questions.

    Leave a comment:


  • RobinT
    replied
    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:


  • RobinT
    replied
    also still not getting the closing bar.

    Leave a comment:


  • RobinT
    replied
    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:


  • RobinT
    replied
    OK< I understand.

    Is the a way of detecting the close of in instrument at the close time.

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    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:


  • RobinT
    replied
    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:


  • NinjaTrader_Jesse
    replied
    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:


  • RobinT
    replied
    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 kinfxhk
by kinfxhk
 
Started by kinfxhk, 07-13-2026, 10:18 AM
0 responses
105 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Started by kinfxhk, 07-13-2026, 09:50 AM
0 responses
86 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Started by kinfxhk, 07-13-2026, 07:21 AM
0 responses
105 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Started by kinfxhk, 07-11-2026, 02:11 AM
0 responses
86 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Working...
X