Search found 96 matches

Go to advanced search

by Steve Burman
Sat Apr 01, 2023 2:05 am
Forum: Pine Script Q&A
Topic: engulfing candle cross EMA
Replies: 3
Views: 2358
 
Jump to post

Re: engulfing candle cross EMA

This is Matt's take on engulfing candles and probably the definition to use for now.

bullEC = close[1] < open[1] and open <= close[1] and close >= open[1]
bearEC = close[1] > open[1] and open >= close[1] and close <= open[1]
by Steve Burman
Fri Mar 31, 2023 4:35 am
Forum: Pine Script Q&A
Topic: Simple String VS Const String error
Replies: 4
Views: 6868
 
Jump to post

Re: Simple String VS Const String error

Brian, I now know why you received this error. It is because you are associating the title of a plot with a string variable which happens when you use string L1 = str.tostring(maLength1) just before the plots. Titles need to be constant strings so change the 1st plot to plot(ma1, color=close >= ma1 ...
by Steve Burman
Mon Mar 27, 2023 5:19 am
Forum: Pine Script Q&A
Topic: Divergence detection (3 Pivot points)
Replies: 3
Views: 4233
 
Jump to post

Re: Divergence detection (3 Pivot points)

Hi Don,

Did you get a reply from Eric Thies to your query?
by Steve Burman
Mon Mar 27, 2023 5:15 am
Forum: Pine Script Q&A
Topic: How to create ATR Trailing Stoploss
Replies: 1
Views: 2012
 
Jump to post

Re: How to create ATR Trailing Stoploss

Are you getting any specific errors or messages? I notice that you are creating market orders but you don't have a qty in your strategy.entry statements so it won. The manual says... qty (series int/float) An optional parameter. Number of contracts/shares/lots/units to trade. The default value is 'N...
by Steve Burman
Mon Mar 27, 2023 5:08 am
Forum: Pine Script Q&A
Topic: Bollinger Band inside candle, RSI signal
Replies: 1
Views: 1950
 
Jump to post

Re: Bollinger Band inside candle, RSI signal

What is it specifically that you want assistance with? Your question is too broad as if you want someone to code it all for you.
by Steve Burman
Mon Mar 27, 2023 2:14 am
Forum: Pine Script Q&A
Topic: Simple String VS Const String error
Replies: 4
Views: 6868
 
Jump to post

Re: Simple String VS Const String error

You have converted L1 to a string which will have automatically embedded quotation marks. Try the following:

plot(ma1, color=close >= ma1 ? color.green : color.red, linewidth=1, title=L1)
by Steve Burman
Mon Mar 13, 2023 10:18 pm
Forum: Pine Script Q&A
Topic: why I have this error...
Replies: 1
Views: 1791
 
Jump to post

Re: why I have this error...

Mart,

You're missing the closing brackets on the line
bcolor = if (if val > 0 and val > val[1]
by Steve Burman
Sun Mar 12, 2023 2:04 am
Forum: Pine Script Q&A
Topic: Hide Old "Opening Range Breakout Lines"
Replies: 2
Views: 3076
 
Jump to post

Re: Hide Old "Opening Range Breakout Lines"

Don, You can add the following to the end of your buy_trigger and sel_trigger lines and barstate.islast however, this will only paint the lines on the last real-time bar if it's a buy or sell. So if the last buy_trigger or sel_trigger is 1 or more bars ago this won't display. The only way I can thin...
by Steve Burman
Sun Mar 05, 2023 11:50 pm
Forum: Pine Script Q&A
Topic: How to trigger alerts in real time (calc_on_every_tick on)
Replies: 6
Views: 5514
 
Jump to post

Re: How to trigger alerts in real time (calc_on_every_tick on)

Well done on working it out yourself. Sometimes a rewrite of a section of code is all it takes, albeit frustrating at times!
by Steve Burman
Fri Mar 03, 2023 5:13 am
Forum: Pine Script Q&A
Topic: creating pivot for the next day using pinescript
Replies: 8
Views: 5660
 
Jump to post

Re: creating pivot for the next day using pinescript

Yes quite a challenge. Sorry I don't have any further ideas on how to fix this for you.

Hopefully someone else can help with this one!

Go to advanced search