hi,
i am trying to extract and use historical data stored in Analytics block to create a technical indicator using Value Extractor block. but I am not able to make it work. Can someone please help me out? Thanks in Advance!!
Answer by russelltromans-1 · Jan 06 at 11:22 AM
Below is a basic example of how you can access the data within the Analytics Block for use in the calculation of your own indicators.
In the below example I have created a 20 period moving average based off the close. I use the Index output of the Loop block to cycle through the 20 most recent bars of the Analytics Block. Each time the index value changes the data in the lower section of the Analytics block marked with an 'i' is updated. I then use a Value Accumulator marked 'Value Collection' to accumulate the value of 'close_i'.
Once the loop sequence is complete I use the Value Extractor labelled 'Moving Average' to divide the 'Value Collection' result by 20 to give me my average value. I then reset the Accumulator Block so that it has a clean data set ready for the next bar complete.
Ask questions and share ideas about the TT® and X_TRADER® platforms.
First time here? See our Getting Started Guide and FAQs.
© 2017 Trading Technologies International, Inc. All rights reserved.
Powered by AnswerHub