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 cmtjoancolmenero, Yesterday, 03:58 PM
      8 responses
      31 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by helpwanted, Today, 03:06 AM
      2 responses
      21 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by DayTradingDEMON, Today, 09:28 AM
      0 responses
      9 views
      0 likes
      Last Post DayTradingDEMON  
      Started by navyguy06, Today, 09:28 AM
      0 responses
      2 views
      0 likes
      Last Post navyguy06  
      Started by rjbtrade1, 11-30-2023, 04:38 PM
      2 responses
      77 views
      0 likes
      Last Post DavidHP
      by DavidHP
       
      Working...
      X