PureBytes Links
Trading Reference Links
|
OK, leaving OM's sermon behind, let's look at the original post:
> This is not occurring in all circumstances. I have a chart of the
> QQQs up and I am attempting to make the signal buy at a limit of
> 79.87 or better. Here is my test code:
> .......
> If date = 1000105 Then begin
> print("Date = ", date);
> buy("test") at 79.87 Limit;
> end;
> if date = 1000106 then begin
> print("Date = ", date);
> print("1/6 Low = ", low);
> end;
> .......
> This is what prints:
> Date = 1000105.00
> Date = 1000106.00
> 1/6 Low = 79.75
>
> This DOES NOT EXECUTE THE BUY.
>
> I tested various numbers at the Limit price. The lowest one that
> will buy is 79.99.
In a quick glance I don't see anything wrong with it. You placed the
buy on 1/5 so it's in effect on 1/6, and the 1/6 bar hit the limit
price. It *should* buy it.
The fact that it DOES buy if you use higher limit prices makes me
VERY suspicious. That indicates that you DO have the right logic
&etc for the buy, and it DOES work, but just not at the prices it
should.
The only thing that comes to mind is that you might have the MinMove
set up wrong for the QQQ symbol. I don't have QQQ in my universe but
I suspect it should use a PriceScale of 1/100 and a Min. Movement of
1 -- which means the price displays with 2 decimal points (xxx.xx)
and 0.01 is the smallest possible move.
If you have it set to a larger minimum movement, entries can act
weird because the minimum "tick size" isn't what you think. I'd
really suspect this if the minimum value that worked was 80.00
instead of 79.99, but it's worth checking anyway.
Gary
|