Search found 96 matches

Go to advanced search

by Steve Burman
Sun May 28, 2023 11:35 am
Forum: Pine Script Q&A
Topic: Visual order of drawing a box
Replies: 3
Views: 1329
 
Jump to post

Re: Visual order of drawing a box

Hi Rob, Unfortunately, the box function does not have a transparency attribute to enable the candle to show through. You could use the bgcolor function to highlight the candle you want which you can specify a transparency for, however, it will be a vertical line with no control over height or placem...
by Steve Burman
Thu May 25, 2023 6:04 am
Forum: Pine Script Q&A
Topic: Create an indicator to plot a shape above the swing highs.
Replies: 2
Views: 2525
 
Jump to post

Re: Create an indicator to plot a shape above the swing highs.

Hi Pooya1072,

Your question may seem elementary but it is providing a challenge because in order to mark the swing high with an X we need to know the next bar and then mark the previous bar. Can I get back to you on this?
by Steve Burman
Wed May 24, 2023 12:15 am
Forum: Pine Script Q&A
Topic: Plot shape and multiple timeframes
Replies: 5
Views: 8263
 
Jump to post

Re: Plot shape and multiple timeframes

Hi Ponderosa, Sorry for the delay in replying. Are you a PineScript Mastery student? If so there is a video on how to get data from higher timeframes. If not the I highly recommend signing up as you will learn so much cool and useful stuff. Here's a link just incase. https://courses.theartoftrading....
by Steve Burman
Wed May 10, 2023 10:59 pm
Forum: Pine Script Q&A
Topic: Plot shape and multiple timeframes
Replies: 5
Views: 8263
 
Jump to post

Re: Plot shape and multiple timeframes

Ponderosa, I need more information. What data do you want to draw from the higher timeframe and given it is a 10 minute chart, where on the 10 minute chart do you want to draw it given for example if you want to plot data from the 1hr timeframe, but which 10 minute bar(s) would that be plotted over ...
by Steve Burman
Thu Apr 20, 2023 2:25 am
Forum: Pine Script Q&A
Topic: Alert for multiple tickers on multiple time frames
Replies: 4
Views: 4352
 
Jump to post

Re: Alert for multiple tickers on multiple time frames

I resolved this by adding a variable declaration as the 1st line after Indicator(). Basically it was saying that alertMsg was undefined

var alertMsg = ""
by Steve Burman
Tue Apr 18, 2023 7:26 am
Forum: Pine Script Q&A
Topic: Timeframe format - easy read
Replies: 2
Views: 2766
 
Jump to post

Re: Timeframe format - easy read

Here's an example of code you can insert. The first 2 lines are just using example time frames so if you already have a timeframe difference in your code it will be the value of timeDiff in this code. // Get two Unix times (timestamps) in milliseconds timestamp1 = timestamp("2022-03-30T00:00:00") ti...
by Steve Burman
Mon Apr 17, 2023 10:13 pm
Forum: Pine Script Q&A
Topic: Alert for multiple tickers on multiple time frames
Replies: 4
Views: 4352
 
Jump to post

Re: Alert for multiple tickers on multiple time frames

Woodsyc, have you managed to resolve this or do you still need help?
by Steve Burman
Sat Apr 08, 2023 2:46 am
Forum: Pine Script Q&A
Topic: Entering trade on same bar as condition check
Replies: 1
Views: 2376
 
Jump to post

Re: Entering trade on same bar as condition check

Unfortunately, Pine Script does not support placing trades on the current real-time bar in the built-in strategy backtesting environment. The strategy will always execute trades on the next bar's open. The main reason for this limitation is that the built-in backtesting environment is designed to em...
by Steve Burman
Thu Apr 06, 2023 10:42 am
Forum: Pine Script Q&A
Topic: Sell an buy at same candle
Replies: 1
Views: 2209
 
Jump to post

Re: Sell an buy at same candle

I'm not sure whether there's an option in the strategy.exit, however, you can check for strategy.position_size == 0 on your buy and sell signal which will prevent this happening such as: if buySignal and strategy.position_size == 0 strategy.entry(id='Long', direction=strategy.long) if sellSignal and...
by Steve Burman
Sun Apr 02, 2023 6:07 am
Forum: Pine Script Q&A
Topic: Detecting Pip spread
Replies: 2
Views: 2279
 
Jump to post

Re: Detecting Pip spread

Hey woodsync, Your logic seems sound and I have it working here. In what way is it not working? Do you have any errors . As far as the Yen is concerned, you will need to do a check for the Yen and adjust the decimal places such as: // Check if Yen yen = str.endswith(syminfo.currency,'JPY') // Detect...

Go to advanced search