Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

A Little help please...

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

    A Little help please...

    I'm not a programmer and am finding the strategy builder a little limiting... but how can I program the following?

    I want to do:

    the Average Close of X days to be > than the same Average Close Y days ago.

    also

    The Close to be > than the Close Y + X days ago.

    Any help would be greatly appreciated.

    Kind Regards,

    Rob

    #2
    If I understand your logic then...

    If:

    Moving Average of X Period of Close prices > Moving Average of X Period Y Days Ago
    AND
    Current Close > Close of Y Days Ago
    AND
    Current Close > Close of X Days Ago

    then do something

    This is no problem. Please review the following Help Guide sections for guidance on how to do price and indicator value comparisons. There are also a few tutorials in the Help Guide as well.




    We have an upcoming 8 hour seminar that specifically targets non-programmers for strategy development and backtesting.

    More information - http://www.ninjatrader.com/webnew/ev...evelopment.htm
    RayNinjaTrader Customer Service

    Comment


      #3
      Here's what I want to do...

      Thanks for your prompt response... I'll be a little clearer...



      Buys:

      1. requires the average close of X days to be greater than the same average close y days ago.
      2. requires the close to be less than the close Y days ago
      3. Requires the close to be greater than the close Y+X days ago.

      It's the opposite for Short sells... and the X and Y values are whatever you choose them to be... so if X=20 and Y=3,

      1. then the average close of the previous 20 days must be greater than the average close of the last 20 days starting 3 days ago. Meaning that the average close of the last 20 days is sloping up.

      2. The system then requires that todays close is less than the close 3 days ago.

      3.Finally the system requires that the close be greater than the close 23 days ago. (verifying the upsloe moving av).

      I have been through the help section but have not been able to find how to perform this operation.

      Your help would be greatly appreciated or if you could recommend someone to write this code for me that would be great to!

      Kind Regards,

      Rob

      Comment


        #4
        Right this is all possible.
        1) do SMA with a period of 20. Set the Bars Ago to be 0 for one side and then for the other side set it to be 3.
        2) choose Close. Bars Ago = 0 on one side and Bars Ago = Y on the other
        3) close. Bars Ago = 0 on one side with Bars Ago = X+Y on the other.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        598 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        343 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        556 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        555 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X