Auto order placement via API Bridge?

Can we enable auto order placement via API Bridge rather than logging in everyday and manually sending in order through TradingView alerts?

Is there any way that the order gets placed automatically whenever*** TradingView*** sends a BUY/SELL signal?

Thank you.

Hi Kumar,

APIBridge places orders automatically if its running and logged in. The need to add manual alerts in Trading View can be overcome by using an automated strategy

https://mycoder.pro/apibridge/free-version-of-tradingview-for-strategy-automation/

From your post I understand that you want to get away with requirement to login daily. There are certain hacks to do it but its not advisable.

First, it is for your own security. As per exchange mandates, the session at all brokers expires every day. You need to login to Fyers terminal web/desktop/mobile every day. Similarly, you need to login to APIBridge every day.

Its for your own security. What if some misconfiguration happens in TradingView and it starts throwing alternate buy/sell orders every second. Login once each day ensures that you are supervising the system.

Brokers do not remove this session expiry because its a mandate by regulators.

However, if you still want, you can record macros to automate it but I will repeat that its not advisable for security reasons.

https://www.google.com/search?q=windows+automation+macro

Thanks for the response, Shivam.

I will actually be logging in daily in the morning. Plus went through a lot of articles on the Fyers API Bridge HELP section to clear each and every detail out.

I had one more kinda technical question about setting alerts in the strategy itself. Can I use {{strategy.order.comment}} in the alert message box instead of normal LE,LX symbols?

Plus can it be possible that the API terminal automatically puts in a SHORT trade along with squaring off my LONG trade in a single go?

Yes, you can use {{strategy.order.comment}} in the alert message box but you need to define the same with your signal conditions in the code. Please see below article on automating alerts.

Automating Alerts with Pinescript - MyCoder

Yes, it is possible to take a short trade while squaring off previous long trade. This can be achieved by using a stop and reverse strategy like Supertrend By KivancOzbilgic wherein signal condition for Long Exit and Short Entry are the same.

Automating Supertrend By KivancOzbilgic - MyCoder

Yeah man. I did the tweaks in my code. Simple string management was required alongwith proper variable assignment.

Thanks for your help Shivam. Much appreciated :slight_smile: