Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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?
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by rhyminkevin, Today, 04:58 PM
    4 responses
    52 views
    0 likes
    Last Post dp8282
    by dp8282
     
    Started by iceman2018, Today, 05:07 PM
    0 responses
    5 views
    0 likes
    Last Post iceman2018  
    Started by lightsun47, Today, 03:51 PM
    0 responses
    7 views
    0 likes
    Last Post lightsun47  
    Started by 00nevest, Today, 02:27 PM
    1 response
    14 views
    0 likes
    Last Post 00nevest  
    Started by futtrader, 04-21-2024, 01:50 AM
    4 responses
    50 views
    0 likes
    Last Post futtrader  
    Working...
    X