Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy/Indicator Relationship

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

    Strategy/Indicator Relationship

    Hi,
    I am trying to fgure out a easy way to setup a trade condition when a variable in a indicator becomes a specific value. I am trying to understand how the strategy accesses the variable and what I specifically have to do in order to give the strategy scope of the variable. Is there an easy way to do this ? I tried the strategy wizard but all I seemed to be able to access in the indicator was the parameters which best I can tell are not updated after they are loaded. Any suggestions would be greatly appreciated.
    Thanks

    #2
    Hi Widgetman,

    I guess you are looking for something depicted in the following code example. It is to be placed in the property section of the indicator you want to evaluate.

    Regards
    Ralph

    Code:
    [FONT=Courier New][SIZE=2][COLOR=#808080][FONT=Courier New][SIZE=2][COLOR=#808080][FONT=Courier New][SIZE=2][COLOR=#808080]///[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#808080][FONT=Courier New][SIZE=2][COLOR=#808080][FONT=Courier New][SIZE=2][COLOR=#808080]<summary>[/COLOR][/SIZE][/FONT]
    [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#808080][FONT=Courier New][SIZE=2][COLOR=#808080][FONT=Courier New][SIZE=2][COLOR=#808080]///[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000] Return a integer variable.[/COLOR][/SIZE][/FONT]
    [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#808080][FONT=Courier New][SIZE=2][COLOR=#808080][FONT=Courier New][SIZE=2][COLOR=#808080]///[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#808080][FONT=Courier New][SIZE=2][COLOR=#808080][FONT=Courier New][SIZE=2][COLOR=#808080]</summary>[/COLOR][/SIZE][/FONT]
    [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2][Browsable([/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])][/SIZE][/FONT]
    [SIZE=2][FONT=Courier New][XmlIgnore()][/FONT][/SIZE]
    [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]public [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] IntVar[/SIZE][/FONT]
    [SIZE=2][FONT=Courier New]{[/FONT][/SIZE]
    [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]  get[/COLOR][/SIZE][/FONT]
    [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]  {[/SIZE][/FONT]
    [SIZE=2][FONT=Courier New]    Update();[/FONT][/SIZE]
    [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]    return[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] intVar;[/SIZE][/FONT]
    [SIZE=2][FONT=Courier New]  }[/FONT][/SIZE]
    [SIZE=2][FONT=Courier New]}[/FONT][/SIZE]
    [/SIZE][/FONT]

    Comment


      #3
      Widgetman, have you seen the reference sample titled: Exposing indicator values? I've also covered this in another thread that you can look over.
      AustinNinjaTrader Customer Service

      Comment


        #4
        Thanks

        Thanks a bunch guys
        I think I understand it better now.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        84 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        46 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        66 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        69 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        58 views
        0 likes
        Last Post CarlTrading  
        Working...
        X