Has any Quant member created a cloneable algorithm that executes long (or short-sell) trades based on trends inputted from 1- or (preferably) 3-minute bars?
My algorithm idea would compare two consecutive bars, one-by-one, throughout the trading day. When two consecutive bars of a selected stock were green (i.e., rising) the platform would execute a market "buy" order. When two consecutive bars were red indicating (I hope) a downward trend, the algo would execute a market short sell order.
If neither a double green or double red occurs in a single, two-bar comparison, the algo would delete the data from the first bar and input data from the next bar for comparison. And so on, all day long.
The algo would reverse the trade, (or merely sell or cover) when the opposite trend appears.
Obviously, there are a few more bells and whistles in this algorithm, but I'm a rank beginner (as you can tell) and need a bit of code just to get started.