PureBytes Links
Trading Reference Links
|
I'm using end-of-day data but would like to use buy and sell stops.
Is it possible?
If my buystop is, for example, when price (not necessarily the open,
close, high or low) penetrates a 5 day ema of a top bollinger band,
can I somehow put in a buystop so that when the price, intraday or
otherwise, touches that level, a buy order is executed at that
price? I can easily put in a buystop where close is greater than the
5 day ema of a top bollinger band:
bb_top = BBandTop(Close,20,2);
avg_top_band = EMA(bb_top,5);
buy = Close>Avg_top_band;
But there's no 'price' variable such that I could do the following:
bb_top = BBandTop(Close,20,2);
avg_top_band = ref((EMA(bb_top,5)),-1);
buy = Price>avg_top_band;
//trying to buy if today's price at anytime penetrates the 5 day ema
of the bb_top from yesterday; executed price should be the price
today at penetration;
What am I missing? I'm sure it's obvious, but I'm at a loss.
Thanks.
Harold Harper
harold@xxxx
|