ChrisMoody

New Video On How To Create Alerts w/ Any Custom Indicator!!!

CME_MINI:ES1!   S&P 500 E-MINI FUTURES
8418 55 29
New Video On How To Create Alerts w/ Any Custom Indicator!!!

If You Have Any Requests On How To Get Alerts To Work

On Any Custom Indicator AFTER You Watch The Video

Please Post Request Below!!!

The Video is 29 Minutes…However, The Video Covers More Than 1 Example So You Probably Won’t Need To Watch The Whole Video.


Link To Video Titled “Creating Alerts w/ Custom Indicators:
http://videos.tradingview.com/video/114269353
timwest PRO
2 years ago
Watching it already! Thanks Chris!
Reply
LudmilaHanania
2 years ago
Hi Chris, please check PM I sent you.
Reply
ChrisMoody PRO LudmilaHanania
2 years ago
Will do...I'm running out to an appointment right now...will catch up on PM's later
Reply
Hey Chris, good stuff :)

Another tip for would be coders is you can bracket something with abs(), which will force it to take the absolute value, resulting in 1 for true and 0 for false.

test = abs(close>5)

will equal 1 if true, 0 if false.

As you mentioned there are many ways to code the if/then/else logic, just thought I would add that in.
Reply
ChrisMoody PRO SPYderCrusher
2 years ago
Great Point...there are 3 or 4 different ways to code it that I know of...was just trying to keep it as basic as possible...

Great Point though....
Reply
4apprentice08
2 years ago
An alternative to creating a separate page to trigger the alert, what about adding to the existing chart, then merge the indicator with the original, then hide the alert version? TV still calculates the Alert indicator without showing it.
Reply
ChrisMoody PRO 4apprentice08
2 years ago
Great Point...there are many options...

I showed creating a separate indicator mainly to see visually exactly when the alerts would be triggered. It's a great visual like in the example of the Williams Vix Fix how after seeing the alerts initially...I decided to change the code a little to trigger the alert on the first bar that wasn't Green.

After you have the alerts set up exactly the way you want them...you can actually just copy and past the True/False Alert condition and the plot into the actual main indicator...And set the alerts from there. The issue is you want to create the separate indicator first to visually see where the alerts will go off...B/C since it's using a value of 0 or 1 depending on how the main indicator plots as far as the scaling....you won't be able to see the 1 and 0 signals....But the actual alert will work perfectly....

Many options....
Reply
4apprentice08 ChrisMoody
2 years ago
I simply meant it as an option to keep the visual trigger handy but not always visibly present. That way you can always refer back to it quickly if you want by simply making the alert indicator visible for a time, then make it invisible when done.....Many options :-)
+1 Reply
ChrisMoody PRO 4apprentice08
2 years ago
Didn't think of that....Great Point!!!
Reply
Donchian Channels currently include the active bar in creating the channel so it is impossible for current price to ever be above or below the plotted channel, rendering it useless for alerts.

Would you please give a code example of Donchian Channels drawn from closed bars only so the active bar with current price is able to trade above or below the plotted channel making those levels useful as alert levels.
Reply
ChrisMoody PRO Roll-The-Bones
2 years ago
Your right but it's simpler than you think. People consider a Breakout of the Donch Channels if thebar takes out or closes above/Below the Previous bars Donch Channel Value.

So it's as simple as saying if Close > "Donch Upper Plot" 1 Bar Ago...I can't show "Brackets" in these posts b/c it won't show correctly b/c these posts think it's html markdown code and they will disappear..But same "Brackets with a 1 in the middle that I showed on Williams Vix Fix Code.
+2 Reply
ChrisMoody PRO ChrisMoody
2 years ago
I'll create code for you though.
Reply
ChrisMoody PRO ChrisMoody
2 years ago
The indicator on top is a custom Donch Channel Indicator I created that allows you to adjust the values of the upper and Lower Band.

You can view the post at
Custom Indicator for Donchian Channels!!! System Rules Included!


Here is a chart with the lower indicator showing When there is a Break Above/Below Donch Channel. This works perfect for alerts.



snapshot

Reply
ChrisMoody PRO ChrisMoody
2 years ago
Will Post Code Tomorrow
Reply
Roll-The-Bones PRO ChrisMoody
2 years ago
OK got it working the way I wanted. Thanks your help and videos they are much appreciated.
Reply
ChrisMoody PRO Roll-The-Bones
2 years ago
Coded a more advanced Indicator....Will release Tuesday morning...
Reply
ChrisMoody PRO
2 years ago
New Version 2 of Donch Channel Indicator with Alerts. Created the upper indicator with new features...and a lower indicator like in the video. BOTH can Trigger Alerts. So you only need the upper Indicator....But the lower one is available if you want it.

New Donchian Channels Modified_V2  With Alert Capability

Reply
ChrisMoody PRO
2 years ago
I was recently asked the question below regarding creating Alerts on Ichimoku Cloud when Price Breaks Above the Cloud.

Here is the Question Asked:
Could you please help me in understanding whats the concept I have to follow if I want to create an alert for Ichimoku cloud. I want to create an alert when the price moves above the cloud or below the cloud.

I thought I have to code price > Span A and price > Span B but then it will give me alert for all the bars and not just the bar that will cause the move up on the cloud. Also, I guess Span A and Span B are changing positions, so we can't say for sure that Span A is always greater than Span B. Any idea?

Thanks for your help.

Here is my Response...

First this is assuming you want a cross above the cloud. Second this is assuming Span A and Span B are the actual names referenced in the code.

You create a condition saying the previous bars close was below Span A if Span A was greater than Span B...and Vice Versa...and current Bars Close was > than Span A if Span A was above Span B etc. This will make the Condition TRUE on 1 Bar...instead of saying Price > Span A...which as you found out is true for ALL Bars above Span A.

True/False Statement:

upCross = (SpanA > SpanB and close(use brackets with 1 in between...can't use brackets in these posts!!!!) < SpanA and close > SpanA) or (SpanB > SpanA and close(same as Bracket Statement used earlier..Brackets with a 1 in between) < SpanB and close > SpanB) ? 1 : 0

This says in English...If SpanA is Greater than SpanB and the previous close is less than SpanA and the current Close is Greater than SpanA ....OR...if SpanB is greater than SpanA and the previous close was less than SpanB and the current close is greater than SpanB...Then Condition is TRUE or Alert....Else Condition is False or No Alert

The create Plot Statement.
plot(upCross, title="Alert on Cross Above Cloud", style=line, linewidth=1, color=yellow)

Then for Alerts Panel you would select Indicator (Whatever name of Ichimoku Indicator is)
Then to the right you would select Alert on Cross Above Cloud
Then Choose Greater Than
Then Select Value
For Value type in .99
Choose on Bar Close are on Condition(could create false alert)

We defined TRUE as 1 so value greater than .99 would Trigger an Alert on the Bar that Crossed above the Cloud....we covered if SpanA or Span B was on top by creating condition for both with a OR statement in between. This should solve your problem...if not let me know....NOTE....this would trigger TRUE in a GAP situation...if you didn't want to show Gaps as TRUE...you would take out the close(Previous Bar condition) and use low < SpanA and close > SpanA....

Hope that helps...let me know if you have any other issues.
Reply
ChrisMoody PRO ChrisMoody
2 years ago
NOTE: Above in the code after the close(Previous Bar Condition with Brackets) it took out the Less Than Sign. It seems in these posts you can't use Brackets or the Less Than or it takes out that whole sentence. Read what I wrote in This Says in English and you should be able to code it.

If not let me know and I will create a DropBox Link with a Text File.
+2 Reply
ChrisMoody PRO ChrisMoody
2 years ago
Here is link to Text File with Code for Break Above AND Below Ichimoku Cloud...With Correct Syntax...

http://d.pr/f/1hO1n
+2 Reply
elp
2 years ago
Chris you've coded some of the best indicators I've used. The best one is the vix fix on the daily time frame to help identify swing lows. I use the the ultimate ma setting 5-8 along with the vix fix too. They are both great. Another indicator I use on the daily time frame is Larry Williams blast off. It too helps identify when the market is getting ready to make a big move. Back in October the blast off indicator on the weekly time frame was giving a signal for a big move and it sure was one! If possible is there any way you could bring the Blast Off indicator to traingview? https://sites.google.com/site/thinkscriptsite/studies/blast-off fwiw, over at fxcm's fxcodebase they have the indicator

Have a great holiday season!
Reply
ChrisMoody PRO elp
2 years ago
Thanks for the comment....For YOU...I will try and code the Blast-Off later....
+1 Reply
elp ChrisMoody
2 years ago
Thank you very much Chris!
Reply
ChrisMoody PRO elp
2 years ago
Your Indicator with link is posted below...
Reply
elp ChrisMoody
2 years ago
TY very much Chris! That was quick!
Reply
ChrisMoody PRO
2 years ago
New Blast Off Indicator with Alerts Included In Code.

Created By Request of user @elpuerto936c

Link to Indicator:
CM_Blast_Off_V1_Alerts Ready


snapshot
Reply
munsifk
2 years ago
Chris I am having trouble with turning my script into an alert. I have detailed my problem here
strategy MACD and RSI alert

If I could get a bit of advice on it, I would appreciate it, thankyou.
Reply
ChrisMoody PRO munsifk
2 years ago
Very Simple....About to record a few videos...so I will get to this soon.
+1 Reply
ChrisMoody PRO munsifk
2 years ago
Recorded Video with example...it shows how to make it work perfect.

Video should be up in a few hours.
Reply
ChrisMoody PRO munsifk
2 years ago
Here is the Video showing how to fix the Alerts so the Alerts ONLY Trigger when the Bars Change Colors.

Video Titled Creating Alerts - Specific Example By Request 1-05-2015 .... Currently Top Right Video on the page.

http://videos.tradingview.com/page/1
Reply
ChrisMoody PRO
2 years ago
Brand New Version of Williams Vix Fix Just Released - V3 - Loaded With Features and Multiple Alerts.
CM_Williams_Vix_Fix_V3_Ultimate_Filtered_Alerts


Other Link at top of the page under Related Ideas

snapshot
Reply
anthony.pace.102 PRO ChrisMoody
2 years ago
This is just what I was looking for !!!
Reply
anthony.pace.102 PRO ChrisMoody
2 years ago
Thank you, you're great ! Happy New Year !!
Reply
ChrisMoody PRO anthony.pace.102
2 years ago
Good...Thanks
Reply
ucsgears PRO
2 years ago
Thanks for the video Chris. I am referring to your video for the Squeeze Alert.
Reply
ChrisMoody PRO ucsgears
2 years ago
No problem....

It's the simplest way to check every aspect of your code. Especially as we get to be better coders...and we create more complex code...I find a lot of people post codes...and the result doesn't actually show what they think it is...because they didn't verify that every time they added a filter/addition to the code...they didn't check to see if it was showing the True/False condition and verifying it was accurate.

Guilty as charged...and that is why I go through these steps....
Reply
ucsgears PRO ChrisMoody
2 years ago
Thanks, Before posting, its a good way to verify, Learnt my lesson with the Linear Regression Slope (V1). I made a mistake and corrected it on the second version. There is no way to remove the code once posted. Which is good.
Reply
sandpipertrader
2 years ago
Hey Chris. Thanks so much for all you do! I have learned so much from you. Both programming and trading! I'm having a problem with programming an alert on an indicator. I've watched the video twice and I think I programmed it right. It seems to plot correctly but I can't get the Alert to fire off. This is my first attempt at writing a script so I'm sure it is something in the way I coded it. When I'm setting up the alert I don't get the option to select the variable "alertline" just the name of the study. If I set the parameter to greater than .9 it doesn't fire but if I set it to less than .9 it fires immediately. So it seems to be on the reaching the server. Basically the indicator determines whether KAMA has crossed over or under a MA and then determines if a Lineal Regression of an RSI is moving up though or down through a target line. Also while I have your attention :-) is there a way to program it so it just alerts on the first instance after KAMA crosses not subsequent instances until the next cross?
example of chart with alert indicator
KAMA MA Cross with RSI Alert

text of source code https://docs.google.com/document/d/1RnukMl_KjxdixEjSQfgSUnIq6jbiK_A2HxjyAzhJg80/edit?usp=sharing

Thanks again really enjoy all your stuff. It is so helpful.
+1 Reply
ChrisMoody PRO sandpipertrader
2 years ago
If you copy your question and post it here I will handle it/Fix It for you...

https://www.tradingview.com/v/JGqi3vQQ/#tc139214
Reply
FxSpecial
2 years ago
Hi, I must admit that your work is truly awesome!!! I was wondering if there is a platform or a simple way to convert some of your indicator in C#?
Reply
radamesbispo
2 years ago
hello Chris how are you.... nice job man.... please can you give me a link where can i learn about Trading view language code ? I have some ideas how to creat custom alerts but I am new here and I want to study about the language code...... i alread know code and programing logic is not hard to me so as seem you video i can see is too easy to code here i wanted to work hard in it to help me and share my job here also.... thanks for you time!!!
Reply
JDSarano PRO
a year ago
Hi, Chris, thank you for your support, I just wanted to ask, if there is a way to have three or more indicators that trigger one alert when all the indicators agree?? thank you!
Reply
Thank you so much!
Reply
I'm looking into a way to:
http://imgur.com/0H0drdP
Do you see any possibilities today?
Reply
I'm looking into a way to:
http://imgur.com/0H0drdP
Do you see any possibilities today?
Reply
J03ya
a year ago
Hello Chris, Thanks for the video! I've watched it several times but can't figure out how to create the alert. I'm using "Vdub_FX_SniperVX3_Strategy" and it gives buy and sell signals. However, I can't figure out how to get an alert when they show up on the chart. Thanks!
Reply
B00mView J03ya
8 months ago
@J03ya Hi there, I having the same problem, I think it maybe to do with the fact that it's a strategy and not an indicator but I'm not sure.
Did you manage to find a solution?
@ChrisMoody Thanks for your work!!
Reply
ajawfi PRO
11 months ago
Hi Chris,
Thank you for the video. it is very informative ! I was wondering, is it possible to make a custom alert using pre-built indicators. For example if I want to combine RSI and ultimate oscillator indicators to create a custom alert, can you please tell me how I can insert per-built indicators in my own scripts ?

Thanks again !
Reply
ChrisMoody PRO ajawfi
10 months ago
Yes...you can accomplish what your trying to...it's really not that hard at all...


Thanks for the question. Unfortunately....and I'm honored by this...But I get so many requests I can't answer them all.

What I am interested in doing is speaking to the Founders of TradingView and offering to do Free Webinars for people who want to learn...Whether it's alerts or any other topic. That way I can help Every One Who Wants Help..at the Same Time.

If you think this is something you would be interested in...Or anyone else...Let me know...Just respond below.
+2 Reply
Captain_Walker PRO ChrisMoody
10 months ago
Yes - I support that. I'm new to coding. I think a lot of people may think that it is hard. Any sort of code on a page tends to look daunting. But really it is so logical when one spends a few moments with it. I'd like to start coding some stuff.
Reply
FahadWaliany ChrisMoody
8 months ago
is it possible to screen stocks based on a public library indicator? If yes, please let me know if you can guide me to the right spot, thank you
Reply
Starlord PRO
10 months ago
Great video and I was able to set up an alert that worked right away! Question I have is I receive the alert on the screen and beep, but not an SMS message nor email that I selected. Is there something preventing me from that? Thanks. Starlord
Reply
ChrisMoody PRO Starlord
9 months ago
Is this the video you watched? It covers that in this video.

http://videos.tradingview.com/video/102651301
Reply
AlexNimerciag
8 months ago
how to auto replay any alarm?
Reply
PietroGarosi
6 months ago
Thanks for the video Chris. I was verey confused but this allowed me to code a strategy for ETF using bollinger bands percentage but there is something that I can't solve.
I need that the entry triggers when the condition is met by 3 days in a row, so I thought that barssince() would help but can't make it work. Can you please give me hand on this?

entryLong = barssince(bullCross)
if (bullCross and bullish and entryLong > 2)
strategy.entry("long", strategy.long, comment="Long")

It still trigger the entry on the first bar :(
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Account and Billing Sign Out