Search found 10 matches

Go to advanced search

by augerpro
Wed Dec 27, 2023 2:22 am
Forum: Pine Script Q&A
Topic: Combining two indicators in one script
Replies: 2
Views: 3671
 
Jump to post

Re: Combining two indicators in one script

Be warned I'm a novice, but you have defined the variable "src" twice. Once in the SuperTrend and once in your SMA at the bottom. You only need to define it once, assuming you are using the same source for both functions. Also the MA selector is using "source" and "length", make sure you are using t...
by augerpro
Sun Dec 17, 2023 3:58 pm
Forum: Pine Script Q&A
Topic: Strategy help needed
Replies: 0
Views: 52536
 
Jump to post

Strategy help needed

I'm writing a simple strategy and having an issue. The basic idea of the strategy is: 1) identify a downtrend, 2) identify a reversal candle, 3) buy at close of reversal candle and enter profit and stoploss orders. It appears my stoploss orders are executing at the correct price, but the profit orde...
by augerpro
Mon Jan 02, 2023 8:35 am
Forum: Pine Script Q&A
Topic: Finding 2nd highest value
Replies: 1
Views: 3388
 
Jump to post

Re: Finding 2nd highest value

The only solution appears to require using an array. So here is my first attempt at arrays! What I am doing is creating an array with an index equal to the lookback period. Then I use array.max to find the highest and second highest values in the array. Now I just want to create a line connecting th...
by augerpro
Mon Jan 02, 2023 12:15 am
Forum: Pine Script Q&A
Topic: Finding 2nd highest value
Replies: 1
Views: 3388
 
Jump to post

Finding 2nd highest value

I'm writing a script that would identify the two highest values over the lookback period, then draw a line through them. Finding the highest is easy enough with ta.highest, but how do you find the 2nd highest value? Another question that probably has an easy answer but since I'm posting here already...
by augerpro
Thu Sep 01, 2022 2:19 am
Forum: Pine Script Q&A
Topic: Bollinger Bands on higher time frame
Replies: 7
Views: 11220
 
Jump to post

Re: Bollinger Bands on higher time frame

I think that might just work. Thank you!
by augerpro
Tue Aug 30, 2022 3:47 pm
Forum: Pine Script Q&A
Topic: Bollinger Bands on higher time frame
Replies: 7
Views: 11220
 
Jump to post

Re: Bollinger Bands on higher time frame

Deep-wave> unfortunately that indicator doesn't solve my problem. Looking through it, it handles calculating a higher time frame RSI essentially the same way I'm calculating my HTF SMA. And my SMA is not the problem, it calculates correctly. My issue is the ta.stdev does not, and I don't understand ...
by augerpro
Tue Aug 30, 2022 3:15 pm
Forum: Pine Script Q&A
Topic: Bollinger Bands on higher time frame
Replies: 7
Views: 11220
 
Jump to post

Re: Bollinger Bands on higher time frame

Actually I do I have one question. In my script I defined a variable "value60 = request.security(syminfo.tickerid, res60, close)", then attempted to apply ta.bb to it "bb60 = ta.bb(value60, 30, 2)", but my plot "plot(bb60, color=color.green)" throws this error when compiling "syntax error: variables...
by augerpro
Tue Aug 30, 2022 3:07 pm
Forum: Pine Script Q&A
Topic: Bollinger Bands on higher time frame
Replies: 7
Views: 11220
 
Jump to post

Re: Bollinger Bands on higher time frame

Thank you! I will look into that and report back if I have issues. I really appreciate the help!
by augerpro
Tue Aug 23, 2022 2:03 am
Forum: Pine Script Q&A
Topic: Bollinger Bands on higher time frame
Replies: 7
Views: 11220
 
Jump to post

Re: Bollinger Bands on higher time frame

No ideas from anyone? I really need to bring this higher timeframe indicator into the lower timeframe chart indicator, so I can create alerts the require certain conditions on both time frames.
by augerpro
Sun Jul 31, 2022 1:32 am
Forum: Pine Script Q&A
Topic: Bollinger Bands on higher time frame
Replies: 7
Views: 11220
 
Jump to post

Bollinger Bands on higher time frame

I created an indicator that identifies candle patterns on the 15 minute chart. However, for a setup to be valid it must touch the bollinger band on the 30 and 60 minute charts also. Using the training video for higher time frame EMA setup as a template, I tried to generate bollinger bands but am hav...

Go to advanced search