Correlation Based Pair Trading Strategy (Trading the spread) There are three popular styles of Pair trading: * Distance based pair trading * Correlation based pair trading * Cointegration based pair trading The correlation based strategy is to short the outperforming instrument and go long on the underperforming one whenever the temporary correlation weakens...
This is version 2 of Special features: Added partial profit taking as price rises. Profit taking is triggered by price crossing an EMA. After profit taking, price has to rise by a user-specified percent before taking profits again. Also includes condition for fully closing position after meeting specified profit target. To incorporate into your algo,...
The script multiplies the price time the volumes. Than relatively calculates whether the stock or product is oversold or overbought. One can subsequently set when to go short or when to go long. The way it works is that there is a small 1 for a long and a -1 for a short. If it is 1 and the followed by a 2 one has a profit. If a -1 is followed by a -2 you traded a...
Calculate the price range , support and resistence for the current day. At the market open this algo will calculate the next price level with no repaint.
Start from a linear regression and using the Fibo parameters I add bands over and under. Because range and volatility are incluse in the algo, the price tends to move between bands with same colors. The middle line (linear regression) is a good signal; after a break happend, the price will move to the last or second last band