Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

calling variable from another indicator

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

    calling variable from another indicator

    I modified an macd indicator and called it macdX I
    created static variables with words fast, slow, smooth to modify the values of diff, macd and avg. The indicator works fine

    Now I am adding the indicator within another indicator script to do something

    I then am calling that indicator in another indicator to do something
    so when I add CrossAbove(MACDX(fast, slow, smooth) I get an error only fast does not exit

    when I put CrossAbove(MACDX(12, 26, 9) does it work.

    I know this has been going on in forum for some time, passing global variable does not exist in NinjaTrader, but in one of the thread I say creating static would but that did not work in this case.

    The only option I have seems to again create the variable in the second indicator, which I will do but just a pain.

    So is there a solution, and will NinjaTrader 8 accommodate global variable finally.

    #2
    nettony, thanks for the post - couldn't really speak in terms of feature commitments for NT8 however Global Variable support in on our list of tracked feedback for consideration and I will certainly make sure to add a vote on your behalf in.

    So the idea would be to add your custom MACD to the chart and then use it's parameters as opposed to adding user input for the calling script in for those as well?

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    569 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    330 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    548 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    548 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X