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 zstheorist, Today, 07:52 PM
      0 responses
      5 views
      0 likes
      Last Post zstheorist  
      Started by pmachiraju, 11-01-2023, 04:46 AM
      8 responses
      150 views
      0 likes
      Last Post rehmans
      by rehmans
       
      Started by mattbsea, Today, 05:44 PM
      0 responses
      6 views
      0 likes
      Last Post mattbsea  
      Started by RideMe, 04-07-2024, 04:54 PM
      6 responses
      33 views
      0 likes
      Last Post RideMe
      by RideMe
       
      Started by tkaboris, Today, 05:13 PM
      0 responses
      6 views
      0 likes
      Last Post tkaboris  
      Working...
      X