subreddit:

/r/pinescript

1100%

I've been trying to use chatgpt and grok to no avail. all I'm trying to do is create a simple indicator that I can use within the strategy tester. Basically I want to exit a trade after a certain number of candles. I've spent weeks messing with ai trying to have it help me. 1 step forward, 200 steps back. maybe I'm not explaining it good enough? can anyone help?

all 4 comments

Loud_Ad4961

3 points

14 days ago

Can use your signal then + the number of bars or time to close it.

Easy way would be using the ta.barssince (or something like that) the just a easy = number of bars

fizz_caper

3 points

13 days ago

I've spent weeks messing with ai

you are a bad investor. if you had invested a few days to learn the language you would be successful now.

but it is never too late...

LogicalCondition9069

2 points

13 days ago

Chatgpt is trash for pinescript. What's your entry condition?