frostybot-js icon indicating copy to clipboard operation
frostybot-js copied to clipboard

Possible to execute same command across multiple stubs?

Open jontstaz opened this issue 4 years ago • 4 comments

I was wondering if you can execute a command to multiple stubs at once.

In the example of tradingview, I was thinking of a workaround by making the webhook alert message trigger a python script which takes the content and executes a command for each stub I want it to trigger.

Eg:

for i in stubList:
  frostybot trade:buy symbol=BTC-PERP size=200 stub=i

Is this possible? Otherwise is there an easier way?

Cheers, Nice script!

jontstaz avatar Jan 06 '21 11:01 jontstaz

Hi

This is not currently possible from within Frostybot. However, it has been requested before so we'll look into adding it as a feature.

On Wed, 6 Jan 2021, 13:47 jontstaz, [email protected] wrote:

I was wondering if you can execute a command to multiple stubs at once.

In the example of tradingview, I was thinking of a workaround by making the webhook alert message trigger a python script which takes the content and executes a command for each stub I want it to trigger.

Eg:

for i in stubList: frostybot trade:buy symbol=BTC-PERP size=200 stub=i

Is this possible? Otherwise is there an easier way?

Cheers, Nice script!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CryptoMF/frostybot-js/issues/13, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMPQ2GZQRJNCHAFDWFWHYLSYRETJANCNFSM4VXNR2MQ .

CryptoMF avatar Jan 06 '21 13:01 CryptoMF

Thanks it would be incredibly useful as I know many others like myself use many Binance Futures subaccounts and like to clone the same trades across multiple accounts due to Binances limited position sizes.

FYI working python script workaround for anyone interested:

import os
stubList = [stub1, stub2, stub3, ...]
for i in stubList:
   os("frostybot trade:buy symbol=BTC-PERP size=200 stub=" + i)

I'm just not sure how to get the TradingView Frostybot webhook to run the python script instead of a frostybot command. Any tips for that?

jontstaz avatar Jan 06 '21 21:01 jontstaz

You can accomplish this via pine script by adding additional commands to your alert syntax. Just copy the command and use a string replace to change the name of the stub. Put this command on a new line in the alert by separating it with a "\n" newline

thekarmakazi avatar Feb 27 '21 19:02 thekarmakazi

Hi This is not currently possible from within Frostybot. However, it has been requested before so we'll look into adding it as a feature. On Wed, 6 Jan 2021, 13:47 jontstaz, @.***> wrote: I was wondering if you can execute a command to multiple stubs at once. In the example of tradingview, I was thinking of a workaround by making the webhook alert message trigger a python script which takes the content and executes a command for each stub I want it to trigger. Eg: for i in stubList: frostybot trade:buy symbol=BTC-PERP size=200 stub=i Is this possible? Otherwise is there an easier way? Cheers, Nice script! — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#13>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMPQ2GZQRJNCHAFDWFWHYLSYRETJANCNFSM4VXNR2MQ .

any form contact with you?

aaqqjj avatar Nov 19 '21 11:11 aaqqjj