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

Building a click trader, need to resolve compiling errors

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

    Building a click trader, need to resolve compiling errors

    I'm getting the errors in the following snapshot. How do I resolve these? Thanks.

    Attached Files

    #2
    Hello inthemoney,

    Thanks for your post.

    On line 14, you need to change 'public class MyStrategy : NinjaTrader.NinjaScript.Strategies' to 'public class MyStrategy : Strategy' to resolve the error.

    This could be seen by opening a New > Strategy Builder window to create a new NinjaScript strategy, clicking the 'View code' button on the Strategy Builder, and noting the same code section to see how it is programmed.

    See this screenshot demonstrating the above: https://brandonh-ninjatrader.tinytak...MF8yMDY2MjYzOQ

    The compile errors for MouseButton and MouseEvent indicate there is a missing assembly reference for these items. To resolve the compile errors you would need to add the appropriate reference assembly to the script to access those values. Note that detecting mouse button clicks is not NinjaScript specific so we do not have NinjaScript help guide documentation on this and it would go beyond the support we are able to provide.

    To find more information about using these C# items, you could do a Google search for something like 'C# MouseButton'. When I Google search for this the first search result I see gives us MSDN documentation for how to reference and use this item in C#.

    See this publicly available MSDN page: https://learn.microsoft.com/en-us/do...w=windowsdeskt op-7.0

    This reference sample could be viewed to see how to add custom buttons in a NinjaScript using WPF modification: https://ninjatrader.com/support/help...ui)-modifi.htm

    You could view this script from the Ecosystem User App Share demonstrates how you could program custom buttons in a NinjaScript to place orders when clicked: https://ninjatraderecosystem.com/use...bar-buttons-2/

    Let me know if I may assist further.



    The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    10 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    14 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Yesterday, 08:42 PM
    0 responses
    11 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Yesterday, 07:51 PM
    0 responses
    14 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,983 views
    3 likes
    Last Post jhudas88  
    Working...
    X