Is it possible to set a variable for an indicator that does not have the option built in?

Login or Register

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

4 posts / 0 new
Last post
dmavro
Last seen: 2 weeks 3 days ago
Joined: 01/12/2023 - 19:41
Is it possible to set a variable for an indicator that does not have the option built in?

Hello,

I was trying to figure out if there was anyway to set indicator values like the most recent Singles High and Low to user variables?

I created custom indicators for the Hi and Lo using the MPH token and set variables for each but then i realized it wouldnt work because what i really needed to return was the most recent Naked High/Low. I believe what i wrote will only return a result on the bar the single starts but im not sure and that would be useless anyway.

I was also trying to set the most recent Swing High and Low to variables but since the Swing High and Low both will have occurred in the past im thinking the results will be the same that i had with my attempt at the Singles.

I was playing around with some ideas for something else im trying to rewrite from my other trading platform which also needs to capture historical bar highs and lows and i was able to get something to work for the most part. It just needs a signal or 2 more so i can get it to plot properly throughout the day. Im just wondering if my approach was the proper way to accomplish what im trying to do. Here are the steps i took...

1. created the custom indicators needed for the signals
2. created signals with conditions needed.
3. created custom indicators that use SSTAT token with the signals to return the results needed .

I still have some issues though and think 1 or 2 more signals might get everything to plot the way it should.

There seem to be multiple ways to accomplish the same things in Investor RT. There are also so many videos covering the aspects of the platform that i didnt know what to watch to find an example of what im trying to do. I just want to make sure my approach is the best approach available to me because ill probably use this as a sort of template for how im going to develop future indicators. Any input would be appreciated.

Thanks,
Dean

0
dmavro
Last seen: 2 weeks 3 days ago
Joined: 01/12/2023 - 19:41
Ive written all the

Ive written all the indicators i wanted to except for one. I just cant seem to get anything pertaining to the Singles to work. Every attempt ive made has returned no value what so ever. My end goal is to have the most recent Singles High and Low available as a variable. What would be even better is if i could get the closest Hi/Lo above and closest Hi/Lo below current price or 1st, 2nd, 3rd Hi/Lo singles levels. Can this be done? If it can be done, I'd really appreciate it if someone could steer me in write direction. Following the exact same concept i did with all the others did not work for some reason.

Thank you,

Dean

Eddy_F
Last seen: 3 months 1 week ago
Joined: 07/30/2014 - 16:18
Accessing the closest single print above/below the current price

Hi Dean,
Please find some feedback here.
As you know, today, it is possible
a) to draw singles line on a TPO chart
b) to “display” singles on a 30 min multipane charts using the MPH indicator with the “extend naked” feature (and possibly filter them based on a minimum price levels).
However, accessing in a custom indicator the closest single print would be very difficult today with the existing RTL toolkit. The issue is that the “closest” single print (just below or above the current price) could be a single print that has been generated either 1 or either 200 single prints ago, depending on the past price action and on how successive single prints might have been partially or fully filled.
So, in RTL, using the MPH token, one could access the low and the high price of the successive single print (see screenshot below). However, the corresponding values are just valid for the timestamp of the bar that generated such a single print. So one could write some Signals or CI that could handle what happens with the past few single prints (one dedicated CI/signal would be needed to monitor each past single print event), but it is going to be complicated to calculate which low or high single print prices remains naked as new single print bar keeps being generated, and therefore to possibly return the “closest” print if this current closest single print was generated 50 "single print signals" ago (assuming the previous 49 have been filled.

Medium term solution :
Clearly, some new dedicated RTL tokens need to be created : these tokens would return historical values of the closest (resp. 2nd closest/3rd closest) single print above (resp. below) the current price (as you mentioned in your second post).
The good news is that similar tokens were introduced in the past for VPOC and LVN/HVN. If you look at the long list of output results for the PROF token, you will find the “closest naked VPOC” or the “closest LVN” or the closest HVN price. So this is most likely feasible…

Short term solution :
In the mean time, an “ancient” TPO chart feature may provide a temporary/partial solution to your issue.:
If you keep running a (hidden) TPO chart, it is possible to automatically store in V# variables
a) the current “high price” of the closest Single above the current price (ie the price that would need to be touched again in order to fully fill that single print)
b) the current “low price” of the closest Single below the current price…
This feature works as per the screenshot below, by adding (in the reference line settings window of the TPO chart) =SINGA / = SINGB and the corresponding V# variables.
These V# variables will be updated whenever a new closest single might be "created" during the day. And as long as the look back period of your TPO chart is long enough, it might provide a "closest print" having been generated many days or weeks ago...

Cheers
Eddy

dmavro
Last seen: 2 weeks 3 days ago
Joined: 01/12/2023 - 19:41
Eddy,

Thanks for the response! Im going to see if i can work with your short term solution by using the TPO chart. I believe that should work for me. At the moment, im still using ExportData in a layout with a couple of charts on it to get my data out of IRT, so adding a TPO chart to the mix isnt an issue. I am working on switching everything to DDE but ran into an issue with my last 10 or so variables and havent gotten a chance to work on them yet. Until then im stuck with my current solution of ExportData, After i switch to DDE im pretty sure im still going to need at least one chart to get my volume nodes out of IRT. So when i switch over its not that big a deal that im going to have to keep the TPO chart open and hidden still too. Not going to lie though, it would definitely be alot more convenient if those tokens were available.

Thanks again,
Dean