Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Function .Set

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

    Function .Set

    Hello,

    I have an indicator that has the next code in NT7:

    MyIndicadtor.Set(1, IndicatorB[1]);

    How can I traduce this code to NT8?

    Thanks!

    #2
    Hello soyjesus,
    Thanks for your post.

    In NT8 you would simply use an "=" assignment operator along with the appropriate index value, instead of ".Set". The equivalent of this in NT8 would be--

    Code:
    MyIndicator[0] = (1, IndicatorB[1]);
    The following help guide documentation details how you can work with Series<T> objects like this one in NT8.

    Series<T>
    https://ninjatrader.com/support/help...s/?seriest.htm

    Also, as you convert code over from NT7 to NT8 you would be well served by looking through the code-breaking changes, as this will detail what parts of your scripts will need to be changed to be in compliance with NT8's under the hood changes.

    Code Breaking Changes
    https://ninjatrader.com/support/help...ng_changes.htm

    Please let me know if you have any further questions.
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Thank you for your help and sorry but I have another question about indicators:

      When I am developing a new indicator I need to refresh mi scren continuously to check the changes.
      How can I do it with NT8? Becase at this moment I only can do it removing the indicator from the screen and inserting it again.

      Comment


        #4
        Hello soyjesus,

        In most cases you can right-click inside your chart and select "Reload NinjaScript" to immediately see changes you have made to the script.

        Please let me know if you have any further questions.
        Josh G.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        43 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        26 views
        0 likes
        Last Post PaulMohn  
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        163 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        98 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        158 views
        2 likes
        Last Post CaptainJack  
        Working...
        X