Page 1 of 1

How to execute orders based on levels ?

Posted: Fri Dec 09, 2022 6:38 am
by signal2telegram
I HAVE A SET TO LEVELS FOR A DAILY. I WANT TO CREATE A STRATEGY BASED ON IT.

I NEED CODES TO PLACE BUY & SELL ORDERS IN PINE SCRIPT.

Re: How to execute orders based on levels ?

Posted: Sun Dec 11, 2022 6:37 pm
by purplemint22
You can create a strategy script pretty easily by using strategy.entry under the same condition as your alert messages. You might need to switch from using alertcondition() to alert() functions, but this is pretty easy.

The main strategy function calls to set up a strategy script are strategy.entry(), strategy.exit(), and strategy.close(). There are a lot of other things you can do with a strategy, but these three functions helped me set up a strategy script pretty quickly without needing to know a whole lot more than this.

Re: How to execute orders based on levels ?

Posted: Wed May 31, 2023 8:07 pm
by taitiano
Hello there! I hope you are doing well. I would like to ask you something about coding if you do not mined...
Regarding pine script, do you know the script to set an OTO order? (one order triggers the oher).
I am looking for a Limit Buy order with stop loss order (after the Limit buy is filled).

I hope you can help me!
Thanks in advance
Gabriel