Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How convert an indicator to a strategy

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

    How convert an indicator to a strategy

    If I have a custom NinjaScript indicator that gives an alert when a given set of conditions is true, how can I backtest it in Strategy Analyzer?

    Is there a way to just change Alert() to something else and run it as a Strategy? Alternatively, could I copy the entire code from the indicator into a new Strategy?

    #2
    If your indicator has a plot value such as 1 when true, 0 when false, just reference the indicator in a strategy otherwise, you could just copy releveant logic from the indicator onBarUpdate() to the strategy OnBarUpdate(). Keep in mind, there may be some methods/properties that don't transfer over.
    RayNinjaTrader Customer Service

    Comment


      #3
      Question for Ray:
      In your judgement, is is better to try to convert Snaphook's Woodies Patterns indicator into a Strategy and use Strategy Analyzer for backtesting, or is it better to use Snaphook's Excel spreadsheets?

      Comment


        #4
        I can't offer an opinion since I am not that close to his work.
        RayNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by kinfxhk, 07-14-2026, 09:39 AM
        0 responses
        89 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 10:18 AM
        0 responses
        92 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 09:50 AM
        0 responses
        70 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 07:21 AM
        0 responses
        87 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-11-2026, 02:11 AM
        0 responses
        64 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X