Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

idata sereies

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

    idata sereies

    hi
    i wanna know if it is possible to add priceseries to the program so that it is treated as being data for charts
    here is the problem
    i m making script which work on ticks and reform them into new chunks according to my calculations
    i wanna the new formed processed data to be treated as if it was the original data
    can this be done
    1st tick price 0.69965 vol 22456 time stamp 2016/4/18/09:44:44.7777777
    2nd tick price 0.69975 vol 22556 time stamp 2016/4/18/09:44:46.7777777
    3rd tick price 0.69985 vol 22476 time stamp 2016/4/18/09:44:48.7777777
    4th tick price 0.69995 vol 22453 time stamp 2016/4/18/09:44:49.7777777

    is converted to
    1st segment price 0.69995 vol 902041 time stamp 2016/4/18/09:44:49.7777777
    2nd segment .................................................. ..............................

    can this be done

    #2
    Hello,

    Thank you for the question.

    I wanted to check if I have understood correctly.

    You want to accumulate 4 ticks for price and volume and then use the accumulated sets as a Price Series or DataSeries in the script, is this correct?

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      hi
      thanks for ur reply
      yes that is wat i wanna do
      is it posible

      Comment


        #4
        Hello,

        Thank you for the reply.

        Are you needing to do any additional calculation or only accumulate the values? If you are only accumulating the values, you could Add a 4 tick series which would be 4 ticks of data per bar.

        If you needed to do additional logic, this would be more difficult as you would likely need to both Add a DataSeries to store your information and add a 1 tick series. The logic would need to be executed and filtered for the BarsInProgress from OnBarUpdate and would likely need to count 4 ticks and accumulate the data, once 4 ticks have been accumulated store this data to a DataSeries. I do not have a specific example that includes exactly this, also I would like to wait for your confirmation on which you would need.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          hi
          thanks for ur reply
          i wanna make this price data series"and if possible volume and time alone series too
          then i ll use the price data series to process the new data "which will be variable number of ticks depending on the logic i made the first price series with"
          then this finished price data series"and in same way volume and time series"will be used to mount indicators or use it as the original data base
          it is little complicated but i need to implement some elliott ideas which needs high low values based upon ticks
          thanks again
          best regards

          Comment


            #6
            Hello,

            Thank you for the reply.

            You could potentially utilize the formate of the example here: http://ninjatrader.com/support/forum...ead.php?t=3572

            In the example it has a 5 minute secondary series, instead this could be set to 4 ticks as you previously described. another 1 tick series could be added to do calculations, or this could be any other time or tick period, this would be BarsInProgress == 2
            In the BarsInProgress == 1 condition, you would need to set the calculated data to the series you create and reset the calculated value or set a flag to indicate the bar has closed.
            In the BarsInProgress == 2 condition, you would do the calculation to a variable

            This would give you a synchronized secondary series which could be used for plotting or passing to an indicator as an example.

            Would this approach potentially be what you are looking for?

            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Jon17, Today, 04:33 PM
            0 responses
            1 view
            0 likes
            Last Post Jon17
            by Jon17
             
            Started by Javierw.ok, Today, 04:12 PM
            0 responses
            6 views
            0 likes
            Last Post Javierw.ok  
            Started by timmbbo, Today, 08:59 AM
            2 responses
            10 views
            0 likes
            Last Post bltdavid  
            Started by alifarahani, Today, 09:40 AM
            6 responses
            41 views
            0 likes
            Last Post alifarahani  
            Started by Waxavi, Today, 02:10 AM
            1 response
            20 views
            0 likes
            Last Post NinjaTrader_LuisH  
            Working...
            X