Bitcoin / US Dollar Perpetual Inverse Swap ContractBitMEX
描述
⋅
Hello All,
Here is a scirpt of ChrisMoody modified with the alerts of purchases and sales. I just have a problem with automation. At the bottom of my script my alerts "Buy1" and "Sell2" give alerts constantly and I wish to have a single alert before the order is completed. Before "Sell1" or Buy2 ".
I found the function "barstate.isfirst" that could possibly work?
It does not show me the arrows as shown above. Am I missing anything ?
EilderJorgeGarcia
⋅
I use a trick for managing automated alerts since TV does an horrible job at it... here's what I do:
Create an alert variable, in your cases it would be buy1, sell1, sell2, buy2.
Create a float variable al1 =0.0, al2=0.0 .... etc
Then write:
if(buy1)
//TAB doesn't work on comments
al1:=0.000001
Now you got 4 numbers that move up only on a signal. Go to the alerts of TV and set your alerts so they fire when the variable equals your number (0.000001 in this case), it should work correctly then.
A fair warning though, remember to add slippage and commission to your strategies :D
karel.balac
⋅
@EilderJorgeGarcia, could you please explain this more to me? Ive added this to the bottom of my script: