Search found 6 matches

Go to advanced search

by CanYouCatchMe01
Sat Jul 03, 2021 1:01 pm
Forum: Pine Script Q&A
Topic: Add date to label
Replies: 1
Views: 1124
 
Jump to post

Re: Add date to label

You can do this. https://i.ibb.co/xL0Qsnn/date-pivot-points.png I get the year as an integer and convert it to a string and then add the text on the label. I was not able to get the day. There is a variable called dayofmonth , but that seems to be another thing. code: // This source code is subject ...
by CanYouCatchMe01
Sat Jul 03, 2021 11:45 am
Forum: Pine Script Q&A
Topic: For Loops & Chronological Order
Replies: 2
Views: 1317
 
Jump to post

Re: For Loops & Chronological Order

The easiest and most efficient way to make a script that "looks back in time" is to use a var varible . With a var variable you can save data without it being erased at the next bar. When one indicator crosses over another you save the current bar_index value to the var variable . You can then subtr...
by CanYouCatchMe01
Thu Jul 01, 2021 8:26 am
Forum: Request Scripts
Topic: Plot stepped Highs and Lows
Replies: 2
Views: 2077
 
Jump to post

Re: Plot stepped Highs and Lows

I'm not sure if I understood what you wanted to do. Is this the result you wanted? You can paint a picture of the result you want, then it may be easier for us to understand. https://i.ibb.co/nQPCLSs/Pivot-hlines.png My script first checks where the pivot points are. The pivot points are displayed w...
by CanYouCatchMe01
Wed Jun 30, 2021 7:44 pm
Forum: Pine Script Q&A
Topic: Strange PineScript Issue
Replies: 1
Views: 653
 
Jump to post

Re: Strange PineScript Issue

I got it to work. https://i.ibb.co/zJ9hBMs/plot-buy-label.png You have assigned your function when you wrote: checkEntryCondition() => close < open But you are never calling the function, so the function never runs. You run the function by typing: checkEntryCondition() Here is the full code: //@vers...
by CanYouCatchMe01
Tue Jun 29, 2021 6:10 am
Forum: Pine Script Q&A
Topic: I want to write a code for a buy condition: closing price has been rising for the last 5 bars
Replies: 1
Views: 605
 
Jump to post

Re: I want to write a code for a buy condition: closing price has been rising for the last 5 bars

You can improve this by making a loop. Then you can easily choose how many days the stock should have gone up before you make a trading decision. I made a script that plots an "X" when the price has gone up for 5 days. https://i.ibb.co/gJJBLPg/five-days-up.png This function checks if the price had g...
by CanYouCatchMe01
Mon Jun 28, 2021 9:39 am
Forum: Request Scripts
Topic: Alert
Replies: 1
Views: 885
 
Jump to post

Re: Alert

This worked. I made a script that can plot multiple RSI lines of different symbols. The colour of the plot is green if the RSI value is below 30, and red if it is above 70. You can just copy the rows and add more symbols. I think the maximum number of stocks to plot is 40. You should also be able to...

Go to advanced search