quantatrading / Quanta-exoTrader

Quanta exoTrader is an advanced cryptocurrency trading algorithm designed to optimise trading through automation and detailed technical analysis, suitable for both novice and experienced traders.
9 stars 1 forks source link

[FEATURE] Separate alerts for webhook trading #41

Open chamber144 opened 2 months ago

chamber144 commented 2 months ago

Describe the feature you are requesting and how it would benefit the performance or user flow Some platforms can not interprete the alerts created by a TV strategy, instead they require to put a specific ID or string in the alert message to trigger opening or closing a position. Having the possibility of additional alerts for buy and sell signals would give us the possibility to also use one of those less flexible platforms. (My example is Cornix, but someone else in the Telegram chat mentioned that he has the same problem with capitalise.ai )

Is the request for TV or exoTrader? TradingView

quantatrading commented 2 months ago

TV strategy limitation is to fire a standard alert() to alert dialog.

To define a separate buy or sell signal the code had to be duplicated into a separate indicator.

This has a dependency on stable code in the TV strategy so once we are there an indicator is trivial.

chamber144 commented 2 months ago

I think you could make it easily with alert_message. Something like this:

//get the specific user input for buy and sell
var GRP_webhook = "Webhook settings"
buySignalComment  = input.string("", "Comment on buy signal",  group = GRP_webhook)
sellSignalComment = input.string("", "Comment on sell signal", group = GRP_webhook)

// Place order using a custom alert message for each.
if buySignal
    strategy.entry("Long", strategy.long, stop = high, alert_message = buySignalComment)
else if sellSignal
    strategy.close("Long", alert_message = sellSignalComment)

This would allow the user to create an alert with only the buy or sell ID using {{strategy.order.alert_message}} grafik