So I have a bot that based of an indicator developed for alt coins and purpose of this to continue long position unless move is provided or stay hedged… This is particularly great for alt coins during a bullrun since coins eventually rally.
so a sequence like:
long signal = long position starts (only once signal just to get started)
short signal = open short hedge position of same coin size
next long signal = close short hedge position
next short signal = open short hedge position of same coin size
and all next signals keep on going like above until finally a long move is given…
now after few hedge closings we may decide to add more coins into long side just so win can be given bigger/sooner. Because of this at the moment we have to change short alert code everytime more coins are added into long. Because long position gets changed and according to that short has to be amended… Is there a way to have functionality in code where we say like:
Example: short DOTUSDT q=same hedge
in above example “q=same” is a variable that checks if there are any amount of coins in running long sides and just open the short position with same amount of Dot coins…
if there’s no running long then ofc this short won’t be executed. If this “same” variable can be developed then it can be used in various form of hedge based strategies, even if manually some coins are added into long/short position, the hedge position can be opened dynamically with the same amount of coins. And we won’t have to amend the alert code at all - it will always open the equivalent size position.
Please let me know your thoughts or if any such thing is already possible.
Cheers!