Back to Community
Switching gears from Stop Loss Percent / Stop Loss Absolute TO Trailing Stop Percent

Hi - Needed some coding advise using Python in Quantopian. Would appreciate.

Question 1:
I was wondering if it's possible to switch gear from stop loss percent or absolute TO Stop Loss Trailing Percent say 0.05%. When unrealized gain/loss percent reaches say 0.25%. If it's below 0.25% then the stop loss percent or absolute holds good. And continue altering the trailing stop loss percent as unrealized gain/loss keeps progressing. Could a matrix for this strategy be defined with variables.

Question 2 :
How to ensure the position gets cleared and closed once Trailing Stops Percent executes. To avoid the risk of unwanted shorting.

Question 3:
Can few stocks may be in CSV format be fed to a pipeline on a daily basis with parameters like Symbol, Number of Shares and Stop Loss Percent. And get used for further calculations. And gets refreshed the next trading day with new datasets in the pipeline.

Question 4:
Wanted to qualify the stocks on a pipeline which came in from the CSV file, to execute trade only if the average volume is greater than x number say 50K.