Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Builder detect drawings/create new values?

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

    Strategy Builder detect drawings/create new values?

    Is there a way for Strategy Builder to detect the drawing of a triangle?
    I have been running into the problem in multiple indicators that don't show values when they trigger - they just draw.

    In the case of the D3Spotter it draws a triangle. Is there a simple way for strategy builder to detect this?

    Or can I simply resave this code as a custom indicator -- and insert a line of code so that when the draw triangle conditions are triggered it also assigns a value (1 or -1) to that long/short action so I can call on this new indicator from a strategy builder strategy?

    (indicator attached)
    Thanks!
    Attached Files
    Last edited by TomTownsend; 01-10-2021, 10:04 AM.

    #2
    Hello TomTownsend,

    The indicator would need to set a plot value that can be used as a signal to a host script.

    Below is a link to an example.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thank you. I am very new to all this so I want to try to clarify what you are suggesting and what the steps would be if I can figure it out.

      1) I could make a new version of the indicator in Ninjascript by borrowing the old script and setting a plot value for when it draws triangles.
      2) I can figure out how to add this plot value his by looking at the sample you posted.
      3) Once created with these plots I can now call on them in my strategies.

      Is that correct?
      Thanks!

      Comment


        #4
        Hello TomTownsend,

        You can choose to copy the script if you would like, if the script is open source.


        Yes, the example I have provided shows how to set a plot value in an indictor when an action happens.

        Yes, indicator plots can be called from a host script like a strategy.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          After hours of trying I'm still at step 1.
          Can you please point me to simple instructions on copying and pasting the existing open source code into a new cs file in Ninjascript so I can try to edit it based on the sample above as a new version of the indicator?
          Thank you.

          Comment


            #6
            Hello TomTownsend,

            Have you opened the script in the NinjaScript Editor?
            Did you right-click the code and select Save As?
            Have you given the copy a new unique name?
            Did you click Save?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Open and Save As, much easier way to start, thanks!

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by NullPointStrategies, Yesterday, 05:17 AM
              0 responses
              66 views
              0 likes
              Last Post NullPointStrategies  
              Started by argusthome, 03-08-2026, 10:06 AM
              0 responses
              141 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              75 views
              0 likes
              Last Post NabilKhattabi  
              Started by Deep42, 03-06-2026, 12:28 AM
              0 responses
              46 views
              0 likes
              Last Post Deep42
              by Deep42
               
              Started by TheRealMorford, 03-05-2026, 06:15 PM
              0 responses
              51 views
              0 likes
              Last Post TheRealMorford  
              Working...
              X