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 NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      64 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      139 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      75 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      45 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      50 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X