signal2telegram
Pine Script Rookie
Pine Script Rookie
Posts: 2
Joined: November 23rd, 2022
Contact: TradingView Profile

How to execute orders based on levels ?

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.

purplemint22
Pine Script Rookie
Pine Script Rookie
Posts: 17
Joined: October 14th, 2022

Re: How to execute orders based on levels ?

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.

taitiano
Pine Script Rookie
Pine Script Rookie
Posts: 1
Joined: May 31st, 2023

Re: How to execute orders based on levels ?

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

Return to “General Trading Discussions”