Course Name: Crypto Trading Strategies: Advanced, Section No: 1, Unit No: 9, Unit type: Notebook
Hi there,
When I'm look at the section of "Generate trading signals", it maked all signal as 0, then signal "-1" for selling in the market, and signal "1" for buy (if my understanding is not right, please point out).
But when we trade in the market, above "-1" and "1" are the entry signals of opening positions, what about the the exist signals, is the "0" means closing position?
Or this code does set the signal of closing position?
I'm confusing about these signals meanings. please help me.
Thanks
Hi Clivia,
You understanding is correct. Buy is indicated by the +1 and for sell signal it is -1.
Let's say the cluster belongs to 0 and SMA is less than close price for the particular timestamp, the program will generate a sell signal and it is indicated by -1. If the conditions don't satisfy, the signal will be indicated by 0.
Now suppose you are in a short position, and the buy conditions are satisfied (cluster belongs to 0 and SMA is greater than close price), then the previous short position will be closed and a new buy position will be opened and it is indicated by 1.
Hope that helps. Do let me know if you need more clarification.
Thanks Vibhu,
I get it now
Much appreciated