Is there a way to split the Y axis on rsi using pine code on Tradingview? Basically, I want to display positive volume ta.rsi on the 50-100 part of the Y axis and display negative volume ta.rsi on the 50-0 part of the Y axis. Thank you.
The visual display of how I want it to look works exactly how I wanted it to using volume ta.sma, but then it leaves me having to adjust every time frame for every ticker, because it's not a scale of 0-100 like rsi is. But then when I use volume ta.rsi, it doesn't display negative volume down and positive volume up, like the volume ta.sma does.
Try Rescaling/Normalizing the value of your indicator from another scale
Related
I have EEG data as can be seen in the attached image.
As you can see, there is a time that wave altitude suddenly increases and then decreases after a while. I am looking for the time (horizontal axis) when the wave increase and decreases.
I have shown those areas in the attached image by Red, Green, and Purple color.
Note: I am not an expert in either signal processing or EEG data analysis. Could you explain it in a simple way?
EEG Data
The matlab function findpeaks may fit your needs. Without data, we cannot help you more than this: try help findpeaks.
You can use a picker to detect the points of sudden increase. A common approach is the short term average over long term average picker (STA/LTA) which detects (picks) when this value exceeds a threshold. This would give you the onset, if you then flip your signal in time and do the picking again you can get the end of your bursts. Here is an implementation of the STA/LTA picker
https://github.com/bpostlethwaite/Masters-Thesis/blob/master/matlab/sourceStack/stalta.m
I'm trying to calculate and present the Subtraction images of a Dynamic MRI Sequence. However, I've looked for quite some time and I can't seem to find how to relate the individual Rescale Slope and Intercept and even Window Center and Width fields with the respective fields for the new Subtracted image.
I'm sorry if it is a repost but I can't find the answer for this particular problem.
I guess that for Slope and Intercept I probably should just apply the old ones, subtract the images and make sure they are within uint16 range, but what about Window Center and Width?
Thanks in advance
About Rescale Slope and -Intercept:
You can apply the original values of the slices you subtracted, if they are all equal in the slices you subtract from each other. If they are not equal, you will have to rescale one of the slices to the slope/intercept of the other one before doing the subtraction. Otherwise, the subtraction will yield wrong grayscales. Obviously, the resulting subtracted image will then be assigned the slope and intercept of the slice you rescaled the other one to.
About Window Center and -Width:
There is no answer which is right or wrong. Windowing depends on the taste of the person viewing the images - ask three physicians and receive four different answers ;-)
I would rather recommend to calculate new values from the histogram of the subtracted image than trying to calculate them from the orginal slices. Subtraction means that you eliminate tissue. The original values were probably adjusted in such a way that this tissue is visible. Now that you have subtracted it you want to have a window that emphasizes the vessels - the rest is just noise.
I am currently trying to use spectral-methods to analyse topographic landscapes.
When i FFT the landscape and plot the power-spectrum. From the power-spectrum an orientation of the structures in the landscape can be found.
2D power-spectrum:-
In this power-spectrum, i would like to make a cross-section.
This is easy when the peak amplitude orientation is along the x or y-axis.
But for this area (and others), this is not the case.
Cross-section from another area - orientated along the y-axis:-
My problem is i want to make a cross-section along the peaks in 1, and i just cant seem to figure it out how.
If anyone could point me towards some solution for this. Been stuck here for a couple of days now.
Edit 1
I would like the cross-section, to be a line along the peak orientation.
Edit 2
Improved the first image to show where i want my cross-section
My solution was, as GameOfThrows suggested:
Pick 2 (or more) points on the orientation i want
used Least squares on the points to create the line
Setup a meshgrid for the interpolation.
Use the interp2 function on the new line.
define a proper axis for the section
In my final cross section i ended up having multiple lines in it, that way i was sure to hit the max amplitudes.
i was a little with the answer to my question, but i have been busy :)
You can use ginput built-in matlab function to store 2 (x,y) coordinates of your power spectrum and then use this values to delimit a profile to be interpolated.
I have some energy 24 hour consumption data of many days.
Plotting a specific day gives me vertical axis of consumption and horizontal axis of time.
I would like to plot for lets say 1 year.
If I use "hold on/off" command, it plots all days together on top of each other.
How can i plot in a way that for the second day, the plots goes to the continue of the first plot (horizontal axis extends automatically)? So, when I have the complete plot, it shows 365 days of energy consumption based on hour. It's like the horizontal axis is repeating while the vertical axis is updating. I'm talking about MATLAB.
You can still use hold on and plot each day separately (if I understand your question properly, this is what you want, separate plotting). Simply make sure your x-axis values are correct. So e.g. if you have one measurement value per hour, the plot day 1:
plot(1:24,valDay1,'k-')
then for day 2:
plot(25:48,valDay2,'r-')
etc. This will line things up correctly. Also, consider using a datetime as x axis values
So, I found my solution which is very simple. I don't know how it didn't occur earlier.
I just had to use ";" and that's it.
Like this:
DAY=[day1;day2;day3]
plot(DAY)
All
I have a control chart, with on the X-axis a time period, and the Y-axis the value of the measure (I'd like to plot all the points in a control chart).
However, I have 2 different values as a measure, which have the exact same date (up to a second match) but different measure values.
When I plot this on a control chart, instead of having 2 points in the control chart with value 500 and 550 for example - it gives me one point with a value of about 200.
It also gives a notification that there is a NULL value in this axis, which points to the X-axis where 2 records have the exact same date.
Any idea what I can do to make this correct - or make tableau draw the measure points correctly?
Thanks in advance!
It's difficult to answer without seeing more detail about your problem, but this sounds like a good candidate for a blended axis. (multiple measures sharing a single axis)
The easiest way to do this is to put your (probably continuous) datetime field on the row axis and one of your measures on the row axis to see one of then control plots. Then drag the second measure to the Y-axis until you see a little translucent two bar icon to indicate that you are adding a second measure to that axis, at which point you can release the pointer and you should see a two plots on the same axis.
If the scales for the two measures are radically different, you can instead drag the second measure to the right side instead to get a dual axis.