[Solved] Buy and sell signal to be optimized in r [duplicate]
The rules for your transformation are : Keep the first 0 if its sequence of 0’s is followed by a 1 set the other 0’s to -1. If the sequence of 0’s is followed by a -1 set all the 0’s to -1 Which is equivalent to Get rid of the -1’s since they are … Read more