Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Slope

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

    Slope

    Can anyone tell me why the script below will not draw a diamond at all, no matter what angle my EMA is at? I used the Strategy wizard, so no other code within the script has been altered. I just copied the pertinent lines below;

    protectedoverridevoid OnBarUpdate()
    {
    // Condition set 1
    if (Slope(EMA(18), 10, 0) > 0)
    {
    DrawDiamond(
    "My diamond" + CurrentBar, false, 0, 0, Color.Red);
    }
    }

    I was only writing this to figure out what numeric value is equalivant to what angle of slope.

    Thanks,

    Safetrading

    #2
    Safetrading, you would need to enter a reasonable Y value to display this, for example Low[0].

    Comment


      #3
      Agree, your diamond is wayyyyyyy below your visible chart.
      eDanny
      NinjaTrader Ecosystem Vendor - Integrity Traders

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      19 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      120 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      174 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      92 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      134 views
      0 likes
      Last Post cmoran13  
      Working...
      X