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

Referencing Manual Price/Data entry

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

    Referencing Manual Price/Data entry

    Hello,

    I'd like to reference a specific price that I can quickly manually change within an automatic strategy. A simple example for illustrative purposes might be "Go long if close > [manual price entry], Go short if close < [manual price entry]. Is it possible to have the strategy continuously check for an update to that number, or does there need to be some kind of forced refresh?

    Also, If I take a manual entry, then update the manual price, I would need the strategy to assume the real world position that I am already long.

    Any help with locking in that static number would be appreciated.

    Thanks

    #2
    Hello Atlas_Trading,

    Thank you for your post.

    If you want your script to base its logic on your real-world position, you would either need to use the Unmanaged Approach and the PositionAccount object to get manual position info, or you would need to utilize the Account class in your script to subscribe to Position, Order, and Execution updates as well as create/submit/change/cancel orders. For more information, please see the links below:As for a manual price entry, you would likely be able to make a WPF modification to add a text field to your chart, such as in the toolbar at the top or within the ChartTrader, when the script is applied. WPF is a general C# concept and not specific to NinjaTrader. We do not offer C# educational services, so making this type of modification starts to go outside of the scope of support we offer. That said, we do have an example of some WPF modifications in the help guide here in this indicator script:That script does not demonstrate how to add a text box where you could enter a manual price; there is a NumericTextBox control that you could use:
    This type of control has been discussed in the following thread:You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our NinjaTrader Ecosystem team to follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request or provide one-on-one educational services.

    Please let us know if we may be of further assistance.
    Emily C.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by cre8able, Yesterday, 01:16 PM
    3 responses
    11 views
    0 likes
    Last Post cre8able  
    Started by ChartTourist, Today, 08:22 AM
    0 responses
    6 views
    0 likes
    Last Post ChartTourist  
    Started by LiamTwine, Today, 08:10 AM
    0 responses
    2 views
    0 likes
    Last Post LiamTwine  
    Started by Balage0922, Today, 07:38 AM
    0 responses
    5 views
    0 likes
    Last Post Balage0922  
    Started by JoMoon2024, Today, 06:56 AM
    0 responses
    6 views
    0 likes
    Last Post JoMoon2024  
    Working...
    X