How do I sum the % chng of multiple instruments?

Login or Register

Please login or register in order to view and post in the Forum.

8 posts / 0 new
Last post
joshdawson
Last seen: 1 year 3 months ago
Joined: 04/14/2015 - 12:25
How do I sum the % chng of multiple instruments?

Hey Chad,
How would I sum the daily chg for multi-instruments?
E.G
ES = 1%
NQ = -1%
YM = 1%
TF = -1%

Sum = 0

What is the best way to go about doing this?

0
joshdawson
Last seen: 1 year 3 months ago
Joined: 04/14/2015 - 12:25
Bump

Bump

cpayne
Last seen: 1 year 9 months ago
Joined: 03/30/2009 - 00:00
Summing Percent Change

Joshua,

Sorry for late reply.  

Are you only interested in the current value of this summation (of percent change)?  Or would you like to plot this over time and throughout the session?

Best way to approach this might be to have a custom column setup in a quotepage which computes percent change and stores it into a V# variable for each of your instruments.  Then, create a custom indicator which tracks the summation of all the percent changes (could even be weighted if needed....or each can have equal weight).  With that approach, you can track this value historically, throughout the day, on any periodicity, and even see the op/lo/hi/cl bars on them.

Chad

joshdawson
Last seen: 1 year 3 months ago
Joined: 04/14/2015 - 12:25
Are you only interested in

Are you only interested in the current value of this summation (of percent change)? Or would you like to plot this over time and throughout the session?

I would like to track it throughout the session.

The idea behind this study comes from a professor at Hong Kong University, The Python model he had us build, was to take
NK,
HK.
DAX
NQ
ES
And add the summation of the PCT_CHG. Then we created a signal based on if the summation is positive or negative
Positive = 1
Negative = -1

If the signal was +1 then we took long at the open.
If the signal was -1 then we took short at the open

I want to basically do the same thing in IRT so that I can build a study and get the probability of sucess and do other IRT magical things with the study.

I don't have a API for Python, and Python back test engines are either, ummm not good or, it is a lot of code to get a very simple answer.

Also I didn't know we could do weights in IRT. and that is something I am interested in learning how to do, if you have a link that would be great.

Also no worries about the late reply, I just assumed you were plugged into the matrix, creating amazing tools, for us to use.

cpayne
Last seen: 1 year 9 months ago
Joined: 03/30/2009 - 00:00
Change from Open or Prev Close

And are you interested in the percent change from the open, or previous close.  And if percent change from open.....from the open of the day session or the full session?

joshdawson
Last seen: 1 year 3 months ago
Joined: 04/14/2015 - 12:25
From the open of the Full

From the open of the Full Session sir.
So from 18:00 up to the US open at 09:30 eastern

Bc I want to use the information from the Globex sessions around the world to generate a buy or sell signal for the RTH session open. I think that most sense, right?

cpayne
Last seen: 1 year 9 months ago
Joined: 03/30/2009 - 00:00
Percent Change Summation

OK.  First create a custom indicator with this syntax...

Then create a quotepage and add the symbols you're interested in summing.  Add a custom column that's setup as follows...

make sure to choose the correcct full session above....

or store in whatever V# you prefer and have available.

Now you should have the percent change continuously being calcualted and stored into V#21 for each instrument...

Now create a Custom Instrument as follows....that tracks the summation of the V#21 of all instruments in your quotepage..

Now you can add the PCHG_SUM symbol to any chart.

 

joshdawson
Last seen: 1 year 3 months ago
Joined: 04/14/2015 - 12:25
I think I did it right. Custom Columns is really cool.

BEGIN Investor/RT CUSTOM INSTRUMENT DEFINITION for CI SUM
CUSTINST: CI SUM,1,31,12,User Defined Sum TYPE=SUM
COMPONENT: NQM2,52,31,3,12,E-Mini Nasdaq-100 MULT=1 PRICE=126 (26)
COMPONENT: ESM2,52,31,3,12,E-Mini S&P 500 MULT=1 PRICE=126 (26)
END Investor/RT CUSTOM INSTRUMENT DEFINITION for CI SUM
BEGIN Investor/RT CHART DEFINITION for Untitled_11
--
--To Import This Chart, drag and drop this file onto any Investor/RT window, or:
--1. Select all the text in this file.
--2. COPY to clipboard (Ctrl+C)
--3. Go to Investor/RT and PASTE (Ctrl+V)
--To learn more about importing definitions see www.linnsoft.com/importing.
--
COMMENT=NONE
SOURCE=Joshua Dawson
PLATFORM=Windows 10 x64 (6.2, Build 9200)
DATE=2022-05-03 20:46
TIMEZONE=Eastern Daylight Time (UTC - 5:00) DST
VERSION=15.1.6 x64 (Build #33540 Apr 7 2022 17:22:37)
DATAFEED=Rithmic + DTNMA ORS=9 Rithmic
NAME=Untitled_11 SIZE=691,1228
PERIODICITY=10,87840,1073741824 (1 Day*)
PIXELS=16:0
LOOKAHEAD=0
RMARGIN=171
CFLAGS=524288 CFLAGS2=147969
VIEWPERIOD=1,1,30,3730897800,3734525700 (Last 30 hours)
SUBSESSION=0,30,2
COLORS=15461355,5131854,5329233,16053492,5789784,11382189,16777215,0,0
DESC=Untitled_11: CI SUM (1d*) 1 Day*, Full Session 16:30-16:15
SESSION OVERRIDE=31 24 Hour Session: Hours: 16:30 to 16:15
TICKER=CI SUM:AUTO:31 SECTYPE=16 DISPLAY=12 ALIAS=- DAYSESSION=0
-Tick Data: 3 Days, Intraday: 10 Days, Daily: 10000 Days
PANE #1 PCT=0.035439 PFLAGS=256 SCALE=1,0.000000,0.000000,0.000000,0.000000,0.000000,0,0
INDICATOR: BUTN #94 ASSOC: CI SUM:AUTO:31 ID#1 PERIODICITY: 10,87840,1073741824 DESC: BUTN: Select LABEL: F TXTLBL: F,"",F RECALC: 0,0 PREFS: 26,0,4,0,15011501,Maximize,0,\0,0,15790320,Select,2,0,1,30,0,16746632,117440512,0,0,50331903,117440512,Pivot,10,2,
INDICATOR: BUTN #94 ASSOC: CI SUM:AUTO:31 ID#1 PERIODICITY: 10,87840,1073741824 DESC: BUTN: Select LABEL: F TXTLBL: F,"",F RECALC: 0,0 PREFS: 26,0,4,0,15011501,Minimize,0,\0,0,15790320,Select,2,0,1,30,0,16746632,117440512,0,0,50331903,117440512,Pivot,10,2,
INDICATOR: BUTN #94 ASSOC: CI SUM:AUTO:31 ID#1 PERIODICITY: 10,87840,1073741824 DESC: BUTN: Select LABEL: F TXTLBL: F,"",F RECALC: 0,0 PREFS: 26,0,4,0,15011501,Restore,0,\0,0,15790320,Select,2,0,1,30,0,16746632,117440512,0,0,50331903,117440512,Pivot,10,2,
PANE #2 PCT=0.965766 PFLAGS=33792 SCALE=17,-2.000000,2.000000,0.000000,0.000000,0.000000,0,0
INSTRUMENT: CI SUM:AUTO:31 ID#1 PERIODICITY: 10,87840,1073741824,0,1,1 TYPE: 3,2,12 COLORS: 12632256,16744576,1,0 [Alias: -]
VAP_FOOTPRINT: 0,0,2,0,9,0,0,100,1,0,0,4160,50,0,0.25,0,0,0,0,0,Arial,0,
SESSION #31. 24 Hour Session: Open,UnPosted, Hours: 16:30 to 16:15
END Investor/RT CHART DEFINITION for Untitled_11