Search found 6 matches

Go to advanced search

by Shenpai
Sun Apr 17, 2022 8:27 pm
Forum: Pine Script Q&A
Topic: Set a fixed 0 to 100 range for a plotted line
Replies: 5
Views: 2759
 
Jump to post

Re: Set a fixed 0 to 100 range for a plotted line

I spent some time with finding a solution but it's definetely complicated and I learned a lot about arrays today. Still I couldn't find out how to put plot function into a loop so this is the part where still some manual work has to be done Also the data is not drawn as a line but as single values. ...
by Shenpai
Sun Apr 17, 2022 6:57 pm
Forum: Pine Script Q&A
Topic: Simple Turnaround Tuesday strategie
Replies: 2
Views: 942
 
Jump to post

Re: Simple Turnaround Tuesday strategie

I think there are two problems depending on what you want the strategy use for. I tried and researched a bit. When you want to backtest the strategy it doesnt seem to work, because the backtesting tool seems to fill orders just a closing price but not at opening price. If you try to actually use the...
by Shenpai
Sun Apr 17, 2022 5:49 pm
Forum: Pine Script Q&A
Topic: Set a fixed 0 to 100 range for a plotted line
Replies: 5
Views: 2759
 
Jump to post

Re: Set a fixed 0 to 100 range for a plotted line

Two more questions before it gets complicated. 1) I guess it's not enough to get just one value (the present one) out of your desired single line. So you need the whole line with all its historic values? 2) Another option would be similar to what I already suggested: Wouldnt it be possible to manual...
by Shenpai
Fri Apr 15, 2022 11:38 pm
Forum: Pine Script Q&A
Topic: Check if a buy order has been placed in de last X candles
Replies: 1
Views: 571
 
Jump to post

Re: Check if a buy order has been placed in de last X candles

this should work if the order placed in the last 20 candles is still open. if it was opened 18 candles ago and closed 10 candles ago this will not detect the order. If it's important to know if there was ANY order, tell me and I try to help. barsSinceLastEntry()=> strategy.opentrades > 0 ? (bar_inde...
by Shenpai
Fri Apr 15, 2022 11:15 pm
Forum: Pine Script Q&A
Topic: Set a fixed 0 to 100 range for a plotted line
Replies: 5
Views: 2759
 
Jump to post

Re: Set a fixed 0 to 100 range for a plotted line

Im pretty new to pine script so please be patient with me if I'm totally wrong. My workaround ideas: 1) Wouldnt it be possible to get all values at the last bar e.g. via array and then plotting them with offset -1,-2,etc ? At the last bar it should be able to calculate ur range cause u know the abso...
by Shenpai
Fri Apr 15, 2022 10:59 pm
Forum: Request Scripts
Topic: How to replace the strategy in this 40 alert script?
Replies: 2
Views: 1442
 
Jump to post

Re: How to replace the strategy in this 40 alert script?

I don't really get what you need the old script for. It seems to cover a very complex strategy.
If you want to replace it completely, it will be much easier to just write a new script instead of edit the old one.
Or are there some parts in the old script you want to keep?

Go to advanced search