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

Strategy for Trading with user controlled Button override.

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

    Strategy for Trading with user controlled Button override.

    Have developed a Strategy with setup, trigger and ATM order entry. This works fine.

    However I do not always want the order entry to be automatic. For this purpose I have created an Indicator which puts Enable/Disable Long/Short on the ChartTrader window as four buttons. These provide ability to user select if I want Long and/or Short trades to fire automatically when the Strategy is running.

    My issue is how do I access this button interface indicator from within the Strategy? If I instantiate the Button Indicator from the Strategy it is "programmatic" and it does not show up on the screen at all. If I manually add the Indicator to the chart window where run the Strategy don't know how to connect to its data/behavior in the running Strategy.

    Is there some way for the initiation of the Strategy to connect to existing Button Indicator?

    I'm new to the NT environment as well as C# and .Net although lifelong programmer. Thx!

    -Jim

    #2
    As a further update I have tried to use a "static" set of Boolean values to share my button state between the visible Indicator and the Strategy bound indicator and it did not work.

    I did have the static work in one thread but it appears the Strategy runs in a different address space so it does not see changes made in the visible GUI.

    Would rather not have to deposit state in a file or otherwise.... any hints??? Thx. -Jim
    Last edited by JimB17; 03-07-2017, 03:56 PM.

    Comment


      #3
      Never mind.... did the work to put the button state into a file content string which the visible indicator writes and the embedded indicator in the Strategy reads. Now even the Trade buttons can live on a different chart from the Strategy it all works.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by wzgy0920, 04-20-2024, 06:09 PM
      2 responses
      26 views
      0 likes
      Last Post wzgy0920  
      Started by wzgy0920, 02-22-2024, 01:11 AM
      5 responses
      32 views
      0 likes
      Last Post wzgy0920  
      Started by wzgy0920, Yesterday, 09:53 PM
      2 responses
      49 views
      0 likes
      Last Post wzgy0920  
      Started by Kensonprib, 04-28-2021, 10:11 AM
      5 responses
      192 views
      0 likes
      Last Post Hasadafa  
      Started by GussJ, 03-04-2020, 03:11 PM
      11 responses
      3,234 views
      0 likes
      Last Post xiinteractive  
      Working...
      X