Quote from Norm:
Hi risktaker,
Thanks for your patience!
The trailing buy would be initiated by a setup. It doesn't really matter what the setup is. When a predefined pattern is recognized, the the trailing stop buy will execute.
That is, I am not looking to code the specific condition that invokes the trailing stop buy. Rather, I am looking for the specific code that follows the stock down after the trailing stop is invoked and then issues a market order after the stop is met with an upturn.
How much up is not important. That would be an input to the system that could be optimized with backtesting.
It is the code that actually follows the stock then then performs the buy that I am interested in.
So, a setup occurs. Say, it is a shorter term average crossing under a longer term average. The assumption (or hope) here is that the price is declining and I can pick up a bargain. I appreciate that this has its own risks, but I have been successful at practicing such methods manually.
Then the crossover could trigger the the trailing stop buy. I don't want to buy right away, because there is some likelihood that the stock will continue to decline. So, the trailing stop follows the stock downward until there is a pre-define upturn (such as .25 point entered into the strategy as an input ).
Once the .25 point upturn occurs, then a market buy order is entered by the trailing stop buy.
Thanks again. I appreciate the time that you have put into responding to my posts.
Norm