New Video Tutorials - Coding Custom Indicators - Ask Questions!

FX:EURJPY   Euro Fx/Japanese Yen
I am currently recording a Video Tutorial Series on PineScript...Creating Custom Indicators.


Each Video will be 10 Minutes in Length, Covering a Specific Topic.

I will Start By Taking A Common Indicator Like the MACD and Starting From The Very Basics, Then Adding In All Customizable Options.

Topics Include:
- The Basics You Need To Know.
- Available Reference Materials.
- Creating Custom Colors Based On Conditions.
- Changing Bar Colors Based On Conditions.
- Using Multi-TimeFrames.
- And More...

We Will Have Guest Appearances From Some Of The Top Coders On TradingView Showing Advanced Techniques!!!

We Will Also Cover Other Types Of Indicators!!!


I would like to edit the zigzag indicator
to draw Aline when a finish wave from the zigzag is finished
it will help to draw the supp and res levels for each end of a wave for the zigzag .

Can you please help me out, I'm trying to do a conditional format of the chart background colour when Stoch is above 80 for example. I'm completely new to pine editor

Hello Cris

This one might be easy for you but I am struggling to find the answer.

All I want to know is how to set an alarm if two indicators meet the right standards(?) or set an indicator as the "Rob Rsi Stoch MACD Combo Alert" indicator.

In this case I want the "CM_RSI-2 Strategy Lower Indicator" crossing the 80 or 90 line and the RSI(5) lower than 60,, if that happens an alert would be off or a red(or green) bar would appear the same way as the "Rob Rsi Stoch MACD Combo Alert" as I mentioned.

It must be very simple for you but if your time is not worth it to explain. Could you tell me where to start from please?

Kind Regards,
Keep your awsome Work ;)
Thank you

Hi Chris

Your posts have been a great source of help for me to develop something of my own using Pine Script. There is one query I have for you. I want to show pivot - support - resistance lines in my custom code only for the current day / session or from a certain number of days before the current day. Standard Pivot Point code in TV library has this feature. But am unable to find a function or set of functions that will enable me to do this. Would be grateful if you can let me know how to do this ?

I am new to pinescript and am trying to figure out a simple strategy/alert that would signal an alert if the weekly %k stoch was greater than the previous weeks close AND the daily %K stoch is greater than the previous days close. Is this doable? Thanks
Hi Chris, not sure if this thread is still being used, but thought I would ask anyway as you seem to be 'the man'. I am having difficulty creating alerts. When my criteria is met, I plot a BUY arrow, and want an alert to occur at the point of the arrow being displayed. I am able to add the alert and condition to some of the currency pairs, but not on some others, because my script does not appear in the 'condition' list of the alert creation screen. My code for the alert is :

alertcondition(Trend == 1 and Trend == -1, "BUY", "BUY")
plotarrow(Trend == 1 and Trend == -1? Trend : na, title="Up Entry Arrow", colorup=green, maxheight=1000, minheight=50, transp=40)
alertcondition(Trend == -1 and Trend == 1, "SELL", "SELL")
plotarrow(Trend == -1 and Trend == 1 ? Trend : na, title="Down Entry Arrow", colordown=red, maxheight=1000, minheight=50, transp=40)

Any help very much appreciated.
Need help creating pine script to indicate 1atr value below and 3 atr value above price entry .

can you help me create a pine script that shows a line at 1 atr value below my price entry# and 3 atr value above the same price entry#.

for example: i want to buy a stock at 1.00, the atr value at 1.00 is 0.20. there for i would like an indicator to draw a line at 0.80 and 1.60.

Thank you
Hey Chris - all great stuff.

I wonder if you know how to create custom indicators for strategies, as you can't pull them in in the same way you can for Study() scripts even if you plot them as boolean indicators on overlays.

The real problem I have is that the strategy position indicators are one bar old and don't get rendered until the next bar, so custom alerts of some form seem necessary. Also in my case, I want "take profits" signals which requires position sizing calculations from the strategy itself so can't just create a separate study() for the underlying indicators.

Also, whilst I'm bothering you... do you know if it's possible to pull in data series from external indicators you don't have the source code for? I saw your post ages ago on the lunar cycles and thought it would be fun to see how that affected my back testing, but I'm not especially keen to manually code in lunar cycle dates back to the year 2000 so want to pivot off the built-in MP indicator in my strategy.


Do you have any tips on how to determine if a strategy script "cheats" by repainting?
+1 Reply
I'm a Software Engineer but completely new to the Pine language. I'm working a lot with SHS or iSHS (I call them fractals) to find a possible target in all time frames. I'm planning to make a program to calculate the target values. With (i)SHS I mean all variants, so also the types with sloping necklines. What I have in mind is to draw the neckline with a special color (variable in program) and after activation of the program it should draw a horizontal line with a special color (another variable) on the calculated target and put the calculated target number unther or above the neckline depending on inverted SHS or not (see picture). The first challenge for the script is to find the values of the points where a bar is connected with the manual drawed neckline (in the picture the neckline is drawed too long to the left to calculate an accurate result).

Are there experienced programmers here who can give me a fast start-up how to do this?

Are there some basics already present I can use to do this?
United States
United Kingdom
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing Priority Support Ideas Published Followers Following Private Messages Chat Sign Out