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 callbacks

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

    Strategy callbacks

    Hi,

    Can anyone point me to the correct way to register a callback into a strategy with a custom DLL? This is for the community, I know this is not supported directly although I will take advice from wherever I can get it.

    I added the references, etc to get the DLL to compile but once I did that, NinjaTrader was decidedly not a happy camper.

    I got compile errors within NinjaTrader saying access to one of the XML files was denied (prior to comiling the DLL that was not an issue) and I got a strange error from @ADL (indicator) saying something to the effect it was referencing a reference Strategy.Strategy that did have a using statement. Of course, I couldn't add one since that is a system component.

    I am simply trying to call back into the strategy from the DLL. It would seem I could pass in "this" from the strategy and have a pointer to any public method in the strategy.

    Any/all help appreciated.

    Best Regards,
    Scott

    #2
    Hello ScottB,

    Can you please provide us with the exact compile error(s) you are receiving?
    MatthewNinjaTrader Product Management

    Comment


      #3
      Matthew,

      This was all a clever ruse on my part to trick the programming gods. I knew if I posted something on the forum and then tried to recreate the issue, it would go away.

      Who knows, when I stopped and restarted NinjaTrader (even though I had already tried this) and recompiled everything, all was OK.

      Thanks for your help, especially the part about appeasing the programming gods.

      Best Regards,
      Scott

      Comment


        #4
        ScottB,

        Glad to hear it is working now.
        MatthewNinjaTrader Product Management

        Comment


          #5
          Matthew,

          As I said, I couldn't have done it without you.

          Best Regards,
          Scott

          Comment


            #6
            Originally posted by ScottB View Post
            Matthew,

            This was all a clever ruse on my part to trick the programming gods. I knew if I posted something on the forum and then tried to recreate the issue, it would go away.

            Who knows, when I stopped and restarted NinjaTrader (even though I had already tried this) and recompiled everything, all was OK.

            Thanks for your help, especially the part about appeasing the programming gods.

            Best Regards,
            Scott
            Ah, yes. the programming gods can have a fickle sense of humor. The only ones worse are the trading gods: their sense of humor is downright cruel.

            Comment


              #7
              Well put koganam. I have heard it said that traders who offer the proper sacrifices can sell the top a few times in their careers but buy the bottom only once. I guess that means I have a few tops to sell because I did in fact buy the bottom a few years ago.

              Of course, since I am a mean reversion scalper, I sold 4 ticks later. No kidding, I bought the e-mini at 667.25 and sold at 668.25 for a cool fifty bucks.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by OllieFeraher, 05-09-2024, 11:14 AM
              5 responses
              16 views
              0 likes
              Last Post MisterTee  
              Started by jackiegils, Yesterday, 11:05 PM
              1 response
              9 views
              0 likes
              Last Post marcus2300  
              Started by Skifree, Today, 02:50 PM
              0 responses
              8 views
              0 likes
              Last Post Skifree
              by Skifree
               
              Started by owen5819, Today, 02:24 PM
              1 response
              12 views
              0 likes
              Last Post owen5819  
              Started by Skifree, 05-07-2024, 11:38 PM
              2 responses
              28 views
              1 like
              Last Post Skifree
              by Skifree
               
              Working...
              X