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 Hwop38, 05-04-2026, 07:02 PM
    0 responses
    161 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    309 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    245 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    349 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    179 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X