Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Worksheet/Indicator Help. Delta and Price

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

    Worksheet/Indicator Help. Delta and Price

    I am trying to create an indicator using the worksheet function

    the formula I want to use will be something like this
    IF Delta>0 , Delta / PriceChange , 0

    NOte: PriceChange= BarOpenPrice - BarCurrent Price (result should be calculated as ticks)

    Can you help me with the syntax and formulas of this expression? I dont know how to find the delta or the price values.

    Thanks​

    #2
    Hello horacioofman,

    I am unsure on the conditions you listed, can you write them as words instead to be clear? For example the first part I understand that would be said as "if delta is greater than 0". The parts following that I am unsure how to interpret, what does the 0 at the end represent?

    As far as the delta goes, are you trying to use a specific indicator that produces a delta or was there a math equation that you wanted to use for that?

    The price change variable could be written as:

    double priceChange = Open[0] - Close[0];

    To calculate something in a number of ticks you would have to convert the value by using math. The variable above would be a different between two prices as the result.

    Comment


      #3
      Hi Jessie,

      Thanks for your reply.
      I was able to create the indicator. I am having some issues now visualizing it correctly.
      Please see attached file for the code I used.
      The 2 files attached is basically the same file, but each one is set to visualize a different variable.

      I am able to visualize 1 variable at a time, (ie the priceDeltaElastP variable) on a histogram chart.
      I want to also be able to include priceDeltaElastN (different variable) on the same chart.

      My workaround for the moment is having an indicator created for each variable, and add them both in the same chart space/area. But I would like to load them both from a single indicator.

      Thanks
      Attached Files

      Comment


        #4
        Hello horacioofman,

        To further this question I would suggest posting in the tradovate community forums, the web platform that NinjaTrader uses at its core uses the javascript framework that the tradovate client uses. The members on that forum would be more knowledgeable about programming in javascript: https://community.tradovate.com/

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        41 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        124 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        64 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        41 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        46 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X