Pine V5 - Alert on Crossing RSI and Crossing MACD - pine-script-v5

How can I create an alert or a script mixing 2 different indicators?
Alert on RSI Crossing and MACD Crossing (MACD crossing after the RSI will give that confirmation).
Thank you in advance for your help.
I don't know how to create an alert mixing 2 indicator so will learn by that

You should use a script to do that.
Install the RSI indicator and the MACD indicator, the copy paste their two code in your new indicator script.
Detect the variables have value for you and test for their crossover or crossunder.
Then in your script you can use :
alert(message, freq)
To create an alert when your conditions are met.
Do not forget to activate the alert on the chart side to make it pop up.

Related

Replace default chart in Pine Script while using overlay=true

Is it possible to replace/make invisible the default chart using Pine Script? As an example, the default chart always shows candles. I would like to write an indicator (using overlay=true) to erase (or make invisible) the default candle chart and replace it by just plotting the close values (e.g., plot(close)). This is just a simple example to illustrate what I want to do and where I'm getting stuck. Thanks in advance.
That's something I've needed in the past too, but unfortunately there's currently no Pine Script command available that allows for the manipulation of the visibility of the symbol on the chart.
It can be partially done, by making the body of the candle the same as the background color, but that still leaves the candle wicks and border intact.
barcolor(chart.bg_color)
Unfortunatly, there's no command to do the same for wickcolor and bordercolor.
Another approach could be to plot a new bar over the existing bars, with body, wicks and border all in the background color.
However, that will not work either - not even when you use explicit_plot_zorder=true - because the z-index of the chart symbol is always seems to be higher.
//#version=5
indicator("My script", explicit_plot_zorder=true, overlay=true)
plotcandle(open, high, low, close, "hideCandle", chart.bg_color, chart.bg_color, bordercolor=chart.bg_color)
So, in short, no solution for this yet.

Matlab How to create an animated plot in App Designer?

I'm attempting to create an animated plot in app designer. So i've got 2 variables u and x displayed on a graph in respect to time with a time slider and a button under it. I wanted to know if it was possible to have a loop always checking in the background if the button is showing '||' so that it would increment uiaxis to display the new set of u and x variable associated with a time increment. And it would keep looping until the button has been pressed or time is tmax where it will restart at 0 and stop incrementing. I've attempted it with a changing value callback however it doesn't seem to loop correctly.

Get session-time (start and close time) of main chart series in pinescript

I am currently trying to write up a script in Pine Script for TradingView, and am having difficulties getting the session (the start and close times) of the current displayed main chart series.
e.g for Nikkei225, the session would be 8:45am - 5:30am (UTC+9)
I am using this to make a Ku-Chart which resets every day on the close time of the main chart series.
Also having difficulty drawing a vertical line at this close time.
Any help would be appreciated :)
See the How To Show Vertical Lines script by allanster.

How to click in two different programs at the same time?

I want to be able to start a timer at the same time that i start a video in media player classic & also be able to pause both at the same time.
lets say that i have to click in the timer the one tha tis in the top left of the image and then click f1 or else the script does not work... also if i want to click it again after the first time it does not work properly..
I tried the following code:
F1::
MouseClick, left, 146, 115
MouseClick, left, 87, 300
Return
I suppose that adding
CoordMode, Mouse, Screen
at the top of your script will help you achieve what you're looking to do.
However, I suggest you use ControlClick instead.
F1::
ControlClick, x87 y300, Hourglass,, Left
ControlClick, x100 y100, Media Player Classic,, Left
return
This will send a click to the x and y relative to each window regardless if they're on top or not (they cannot, however, be minimized)
(please note that you probably have to adjust the x and y coordinates)
https://autohotkey.com/docs/commands/CoordMode.htm
https://autohotkey.com/docs/commands/ControlClick.htm
From my (limited) experience, I believe even hotkeys will carry out actions sequentially i.e. one after the other, in most cases the time delay between clicks will be insignificant howeverwon't be exact.
If the timer (Hourglass) is something you have created yourself, I would maybe suggest adding another button or a hotkey specifically for this use case that adds; for example, a 0.5s delay before the timer begins & then starts the media 0.5s later allowing for them to work in tandem, but as far as starting both applications simultaneously I'm not aware of a method for this.
To clarify though, what was the actual issue with the quoted code above?

Adding Confidence Interval to ANOVA Main Effect & Interaction Plots

In Minitab, Stat > ANOVA > Main Effects Plot or Interactions Plot
Is there a way to add confidence interval to the main effect and interaction plots?
I would like to have a simple and quick view to show that if the main effect or interaction is significant through the confidence interval.
The answer is NO, It is not possible to add confidence interval to the Main/Interaction plots in any version of Minitab using either Menu based navigation or command.