Your post doesn't have enough information for anyone to be able to answer your question.
To get you started on your quest. Here is the code that you shared.
The "price = close" repainting error has been removed and the formatting inconsistencies corrected:
Ruby:
def buytrigger = buy ;
def selltrigger = open < avgExp and close > entryPrice () or rsi > 75 or close < EntryPrice() - 0.39 ;
AddOrder(OrderType.BUY_TO_OPEN, buytrigger, tickcolor = Color.black, arrowcolor = Color.black, name = "buy");
AddOrder(OrderType.SELL_TO_CLOSE, sellTrigger, tickcolor = Color.red, arrowcolor = Color.red, name = "sell");
To make sure your future posts gets the attention and assistance it deserves, here are a few directions to keep in mind:
- Make sure to post your question in the Questions Forum. This is where all the questions go, and where you'll find the most eyes to help you out.
- Include a screenshot of your chart and a shared chart link. This will help others understand the context of your question and allow them to replicate the conditions that you are describing.
- Annotate your image, highlighting the confluence that you're trying to achieve, along with a more detailed written explanation. This will help others understand your question even better and give them more specific information to work with.
If you're unsure of how to share chart links or upload screenshots to the forum, don't worry, we've included some easy-to-follow directions for you.
How to create a shared chart link:
https://usethinkscript.com/threads/how-to-share-a-chart-in-thinkorswim.14221/
How to upload screenshots to the forum:
https://usethinkscript.com/threads/answers-to-commonly-asked-questions.6006/#post-58714
We look forward to seeing your next post and helping you out!