PureBytes Links
Trading Reference Links
|
I read a lot of the archives today.
I'm going to start learning the Custom Backtester tomorrow since
that seems like the most likely avenue.
Hints, directions would be greatly appreciated .
Thanks, Balin
--- In amibroker@xxxxxxxxxxxxxxx, "balin8425" <balin8425@xxx> wrote:
>
> I've tried to work this out and tried to find a solution in the
> archives or the docs. Although it may be there, I haven't found
it
> yet and need some advice.
>
> //This is a short term system which buys on a low RSI
> //The following is a quick simplification of the system
>
> Buy=ref(RSI(14),-1)< 24;
> BuyPrice=open;
>
> //I then have a for loop which has two possible sells:
>
> //first sell
> //if same day as "buy day" and there is a low at buyprice =< $.10
>
> sell[i]=true;
> sellprice[i]=buyprice[i] - $.10;
>
> //second sell
> //if 3 days after "buyday" sell
>
> sell[i] = true;
> sellprice[i]=open;
>
>
> Here is the problem. On a particular stock there may be many buys
> and sells. Sometimes there will be a sell of a previous trade on
> the same day as a new buy signal. That works OK. However, if the
NEW
> trade immediately has another sell signal (ie. when the low goes
> $.10 below the buyprice) there are problems.
>
> I can see that I have one buy and two sell signals on the same
day.
>
> Thanks, Balin
>
|