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 AveryFlynn, Today, 04:57 AM
      0 responses
      4 views
      0 likes
      Last Post AveryFlynn  
      Started by RubenCazorla, 08-30-2022, 06:36 AM
      3 responses
      77 views
      0 likes
      Last Post PaulMohn  
      Started by f.saeidi, Yesterday, 12:14 PM
      9 responses
      23 views
      0 likes
      Last Post f.saeidi  
      Started by Tim-c, Today, 03:54 AM
      0 responses
      3 views
      0 likes
      Last Post Tim-c
      by Tim-c
       
      Started by FrancisMorro, Today, 03:24 AM
      0 responses
      5 views
      0 likes
      Last Post FrancisMorro  
      Working...
      X