Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Need help with new strategy please.

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

    #16
    Ok got it, next.

    Thanks for the explanation Jesse, pretty sure I have it now. I have been learning a lot doing this. I believe the help guide could be better on this subject though.

    Now to next hurdle. I will express to you in English what I wish to do to determine trend direction. Then if you could tell me how to express that in Ninja Script, I would be grateful.
    I want to use the ATRTrailing indicator. This indicator has 2 states, being either short or long.
    So what I wish to express is like this:

    Trend is long when ATRTrailing is long.
    Trend is short when ATRTrailing is short.

    Again in part code, part English:

    ATRTrailing _ATRTrail
    bool LongTrend, _ATRTrail is Long;
    bool ShortTrend, _ATRTrail is Short;

    I should also say that the ATRTrailing indicator is on the UniRenko chart.
    UniRenko index is [1].

    Thanks Jesse.
    Last edited by KennyK; 05-25-2017, 06:54 PM. Reason: Further thought

    Comment


      #17
      Hello,

      Thank you for the reply.

      This would depend on the output of the indicators plot, can you tell me what is the indicator currently show when you apply it? Is it a 1 or -1 as an example? Or does it have two plots in which only one of is a value at a time?

      In the case it has a single plot that has a value that fluctuates between a few states it may look like the following:

      Code:
      if(ATRTrailing(...).PlotName[0] == 1)
      {
      
      } else if(ATRTrailing(...).PlotTwo[0] == -1)
      {
      
      }

      Otherwise, if this was multiple plots it may instead look like:


      Code:
      if(ATRTrailing(...).PlotOne[0] > 0)
      {
      
      } else if(ATRTrailing(...).PlotName[0] > 0)
      {
      
      }

      I look forward to being of further assistance.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      89 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      135 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      119 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      69 views
      0 likes
      Last Post PaulMohn  
      Working...
      X