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 argusthome, 03-08-2026, 10:06 AM
      0 responses
      77 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      45 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      27 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      32 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      62 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X