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].
    BertrandNinjaTrader Customer Service

    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 Adamcoin33, 04-14-2025, 08:08 AM
      4 responses
      50 views
      0 likes
      Last Post MiCe1999  
      Started by asd32, 07-25-2024, 11:11 AM
      6 responses
      188 views
      0 likes
      Last Post A_Green
      by A_Green
       
      Started by sledge, 04-13-2025, 01:53 PM
      4 responses
      44 views
      0 likes
      Last Post sledge
      by sledge
       
      Started by yeonsiewlan, Today, 06:17 PM
      0 responses
      3 views
      0 likes
      Last Post yeonsiewlan  
      Started by utilizator, 03-06-2018, 08:44 PM
      3 responses
      907 views
      0 likes
      Last Post MiCe1999  
      Working...
      X