Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarTimer - Display in custom Indicator

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

    BarTimer - Display in custom Indicator

    Hi,

    I have a custom indicator that i'm creating. I would like to add the BarTimer indicator within my code. How can I add this? I couldn't find any example of how to add this and then also allow the user to use a check mark to disable or enable it in the properties?

    Please let me know.

    Thanks,

    #2
    Hello priceisking,

    You would need to write the same logic in the Bar Timer script into the logic of your script.

    The closest example of copying logic from one script to another is the NinjaScript Editor 401 video.


    You can create inputs for the user to change. A bool would be the checkbox and would have a true or false value.

    Below is a public link to a 3rd party educational site on bool.
    Test the bool type, which holds true or false. A bool occupies 1 byte of memory.


    And a public link to the reference sample on exposing variables.

    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Ok will check it out.

      Would it be possible to create something like this:

      private BarTimer myBarTimer;

      ..
      .
      and then use it in the code something like this:

      this.myBarTimer.show();

      ?

      Instead of coding entire thing that's already done. Was wondering if easy way to do that.

      Comment


        #4
        Hello priceisking,

        The BarTimer indicator does not have a public plot that gets returned.

        You could modify a copy of this script and make a public variable that calls Update() and returns either the barTimeLeft or returns the string that is drawn in the Draw.TextFixed that you can call from another script.

        Below is a public link to a reference sample that demonstrates exposing variables.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by geddyisodin, 04-25-2024, 05:20 AM
        8 responses
        58 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by jxs_xrj, 01-12-2020, 09:49 AM
        4 responses
        3,285 views
        1 like
        Last Post jgualdronc  
        Started by Option Whisperer, Today, 09:55 AM
        0 responses
        5 views
        0 likes
        Last Post Option Whisperer  
        Started by halgo_boulder, 04-20-2024, 08:44 AM
        2 responses
        22 views
        0 likes
        Last Post halgo_boulder  
        Started by mishhh, 05-25-2010, 08:54 AM
        19 responses
        6,189 views
        0 likes
        Last Post rene69851  
        Working...
        X