Search found 2 matches

Go to advanced search

by Rocky
Mon Sep 18, 2023 2:54 am
Forum: Pine Script Q&A
Topic: Can you help me understand why and how to fix this problem?
Replies: 1
Views: 552
 
Jump to post

Re: Can you help me understand why and how to fix this problem?

I think it would be easier for you to create boolean triggers based on the specific variables that make up your Line.
Then, you would have true or false...long or short.....triggers....and you can get rid of the word line entirely.
Keep it simple.
I hope that helps.
by Rocky
Mon Sep 04, 2023 4:55 pm
Forum: Pine Script Q&A
Topic: Question: syntax for shorting
Replies: 1
Views: 710
 
Jump to post

Question: syntax for shorting

Hello. I wonder what is the syntax to open and close a short position? For example, on SPY if the RSI drops below 20 (open) and if the RSI crosses above 80 (close). For some reason, I can successfully code a long position and see open and close (on the chart) but I'm unable to do that for a short po...

Go to advanced search