Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarsArray question

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

    BarsArray question

    In my stategy I want to use:

    If the of the ADX Slope is greater than 0 average for the last 3 bars on BarsArray[1] then...

    I have the following:

    Slope(ADX(BarsArray[1], 14, 3), 0) > 0

    I must be missing something because I cant seem to get it to compile. I have included a screen shot. Any help would be greatly appeciated

    Thank you,
    Attached Files

    #2
    Hi Jeff 15, please see if this works -
    Code:
    [SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2] myAdxSlope = Slope(ADX(BarsArray[[/SIZE][/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2]], [/SIZE][/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]14[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2]), [/SIZE][/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]3[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2], [/SIZE][/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2]);[/SIZE][/SIZE]

    Comment


      #3
      Still need help

      Thanks Bertrand,

      Im still having trouble. I must have in put the code incorrectly. I have attached a screen shot to show you what I have.
      Thank you,
      Attached Files

      Comment


        #4
        Jeff, this was just a sample for the correct Slope call - you want to replace it with yours in your code and see if that compiles well.

        Comment


          #5
          Ok I got it

          Thanks Bertrand,

          I got it now.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          152 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          89 views
          1 like
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          133 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          127 views
          1 like
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          107 views
          0 likes
          Last Post CarlTrading  
          Working...
          X