Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw.ArrowDown()

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

    #31
    Hello James,

    Thanks for your notes.

    When exporting your script you will need to include ChartMarkersPlus to the export.

    ChartMarkersPlus could be found in the 'DrawingTool' section of scripts. In the Export window, select the 'Type' drop-down menu and select 'Drawing tools' to locate the ChartMarkersPlus drawing tool.

    Exporting: https://ninjatrader.com/support/help...nt8/export.htm
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #32
      Hello Brandon,
      I had a coder help me a little with figuring out how to use the SharpDX for the objects. I am having a little trouble with the equation.
      On bar[0] I'm looking for the object to plot if true and to remove the object if false. Is it possible to get some insight from you?
      The object plots but it doesn't seem to be always accurate.
      Thank you for any help.
      James

      if( ( (( GetCurrentBid(0) > (ChartBars.Bars.GetLow( totalBars -1) + (2*TickSize)) && ( Gom2.IsSellImbalanceOnLow.GetValueAt( Gom2.IsSellImbalanceOnLow.Count -1 ) == 1))))
      &&
      (!((Gom2.IsSellImbalanceOnLow.GetValueAt( Gom2.IsSellImbalanceOnLow.Count -1) == 0) // Gom 2 - trapped traders
      || ( GetCurrentAsk(0) < (ChartBars.Bars.GetLow( totalBars -1) + (2*TickSize))))))
      {
      DXH.FillRectangle( RenderTarget, chartControl.GetXByBarIndex( ChartBars, totalBars - 1) - ttSize, chartScale.GetYByValue( ( ChartBars.Bars.GetLow( totalBars-1) + (oftt_offset*TickSize))) - ttSize, 2 * ttSize, 2 * ttSize, "OfttColor");
      DXH.DrawRectangle( RenderTarget, chartControl.GetXByBarIndex( ChartBars, totalBars - 1) - ttSize, chartScale.GetYByValue( ( ChartBars.Bars.GetLow( totalBars-1) + (oftt_offset*TickSize))) - ttSize, 2 * ttSize, 2 * ttSize, "OfttBColor", 1, DashStyleHelper.Solid);

      }​

      Comment


        #33
        Hello James,

        Thanks for your notes.

        This forum thread is for questions regarding Draw.ArrowDown() and using ChartMarkersPlus indicator to draw an arrow. Using SharpDX would not be related to this forum thread.

        If a script is not working as expected then debugging prints would need to be added to the script to understand exactly how your logic is evaluating. Add prints to the script that prints out the logic being used to draw the objects to see how it is evaluating. Prints will appear in a New > NinjaScript Editor window.

        Below is a link to a forum post that demonstrates how to use prints to understand behavior.


        You could view the SampleCustomRender sample script that comes default with NinjaTrader for an overview of using SharpDX in OnRender() to custom render objects on a chart. To view the script, open a New > NinjaScript Editor window, open the Indicators folder, and double-click on the SampleCustomRender file.

        See the help guide documentation below for more information about SharpDX and OnRender().

        Using SharpDX for Custom Chart Rendering: https://ninjatrader.com/support/help..._rendering.htm
        OnRender(): https://ninjatrader.com/support/help...8/onrender.htm
        RenderTarget.DrawRectangle(): https://ninjatrader.com/support/help...wrectangle.htm

        For any other SharpDX-related questions that may arise, please create a new forum thread or write in to support[at]ninjatrader[dot]com and one of our Support Technicians will be happy to assist.

        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        629 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        362 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        564 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        568 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X