Search found 17 matches

Go to advanced search

by purplemint22
Thu Jan 12, 2023 10:59 pm
Forum: Pine Script Q&A
Topic: Strategy entry on exact price
Replies: 2
Views: 2010
 
Jump to post

Re: Strategy entry on exact price

I would suggest playing around with the barstate commands when assigning the variable. You could try something like if barstate.isnew and high > high[1] buyprice = high + 2% Although, the problem with this is that it is subject to repainting. TradingView suggests using barstate.isconfirmed as a way ...
by purplemint22
Thu Jan 12, 2023 10:44 pm
Forum: Pine Script Q&A
Topic: Number after indicator label
Replies: 1
Views: 841
 
Jump to post

Re: Number after indicator label

It's a little hard to tell what you are trying to say from the image. The number will show when you hover over the indicator when the value is added to the plot() function. I can see that you have something plotted from the second image. Could it be that you added a display.none command when you plo...
by purplemint22
Wed Dec 28, 2022 12:34 am
Forum: Pine Script Q&A
Topic: Error that I can't figure out.
Replies: 1
Views: 1187
 
Jump to post

Re: Error that I can't figure out.

I went through and changed some things so it would compile. I added comments to the script and highlight them with *** so you will be able to see what I changed. This way you can you go through it in a pinescript editor. // @version=5 // Define strategy input parameters //*************I added a stra...
by purplemint22
Sun Dec 11, 2022 7:05 pm
Forum: Pine Script Q&A
Topic: Please help with bool and user input values
Replies: 2
Views: 1756
 
Jump to post

Re: Please help with bool and user input values

The only thing that I can think of would be to use a variable for the default value that can be changed. I tried this and I get an error saying 10:47:11 AM — Compilation error. Line 10: Syntax error: Arguments of input function must be of constant type, or 'source' builtin variables So it looks like...
by purplemint22
Sun Dec 11, 2022 6:37 pm
Forum: General Trading Discussions
Topic: How to execute orders based on levels ?
Replies: 2
Views: 4571
 
Jump to post

Re: How to execute orders based on levels ?

You can create a strategy script pretty easily by using strategy.entry under the same condition as your alert messages. You might need to switch from using alertcondition() to alert() functions, but this is pretty easy. The main strategy function calls to set up a strategy script are strategy.entry(...
by purplemint22
Thu Dec 08, 2022 7:52 pm
Forum: Share Your Scripts
Topic: WaveTrend and Multi-Timeframe Trend Reversal
Replies: 3
Views: 5490
 
Jump to post

Re: WaveTrend and Multi-Timeframe Trend Reversal

I was interested in seeing how this worked too, but I had the same problem when I tried to copy/paste the code into the pine editor. I don't know if some of the formatting changed with it was pasted on the forum. Maybe try to use the code button under the full editor?
by purplemint22
Thu Dec 08, 2022 7:48 pm
Forum: Pine Script Q&A
Topic: using a bot to scan through watchlist to trade
Replies: 1
Views: 847
 
Jump to post

Re: using a bot to scan through watchlist to trade

I'm pretty sure you would have to set up the bot for each chart because the strategy has to be applied to the chart in order to scan for a set up, and the only way to do this is to have the strategy attached to each chart individually.
by purplemint22
Thu Dec 08, 2022 7:42 pm
Forum: Pine Script Q&A
Topic: Get these arows (< >) in the input settings menu?
Replies: 2
Views: 1183
 
Jump to post

Re: Get these arows (< >) in the input settings menu?

I think you would have to set up a work around for this since you can't create an options list for a logical operator that won't translate this input as a string and a string won't be able to perform a comparison. I would suggest creating another level to this with a boolean input so that false tran...
by purplemint22
Thu Dec 08, 2022 7:25 pm
Forum: Pine Script Q&A
Topic: Please respond! Logical and or not programming
Replies: 2
Views: 1268
 
Jump to post

Re: Please respond! Logical and or not programming

Interesting idea. This is how I would go about setting up a drop down for your input string with or as the default value since it has the highest priority.

logicalOperatorInput = input.string("or", title = "Logical Operator Options", options = ["or", "and", "not"])
by purplemint22
Sun Nov 13, 2022 7:06 am
Forum: Pine Script Q&A
Topic: Add delay to this script before and after an economic annoucement
Replies: 4
Views: 2079
 
Jump to post

Re: Add delay to this script before and after an economic annoucement

Yeah I think your indicator is awesome, but it has gone over my head a little bit. I wish I could help because I would love to have something like this myself as well. I hope you are able to get it worked out in time.

Go to advanced search