[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

limit orders and fun with the symbol universe



PureBytes Links

Trading Reference Links

With the help of the list I got my limit order problem solved.  At the bottom of this 
post is code that works as it should.  It buys on Friday's close and exits anytime there 
is a 1 tick profit.  (Obviously this is not really a system, but just a test to make sure 
TS is finally doing what it should).  I thought some people might find this useful as a 
template for their own work.  This code, inspired by old posts to the list from "Michael 
L.", creates its own variables for entryprice(0),marketposition(0), and barssinceentry.

However, I think I also have a symbol universe problem that has complicated my 
efforts.  When I apply this system to bonds, I get the same results using "1 point" or 
".03125".  The same with yen using "1 point" or ".0001".  However, when I apply 
this to stocks, which is what I really want to test on, I get different results depending 
on whether I use "1 point" or ".125".

My symbol universe settings are as follows:
Limit:  10000
MinMove 125.0000
Value  1.00000

Using "1 point" for stocks gives inconsistent results.  Somtimes the system enters and 
exits at the same price, instead of with a 1 tick profit.  Output to the print log shows 
the pointvalue for stocks as 0.  Yet, if this were really true, the system would never 
exit at a 1 tick profit, which it seems to do about 85% of the time.

Now the simple answer is to screw pointvalue, and just use .125.  But I have this 
crazy desire to understand exactly what is going on so I can have confidence in the 
results.  As it stands now, I have no confidence in the system report.  Has anybody 
else run into a similar problem?  Are my symbol universe settings correct for stocks 
(assuming they still trade in 1/8's rather than 1/16's)?  Any suggestions are greatly 
appreciated.

Regards,

Lawson McWhorter
lawson@xxxxxxxxxxxxx

*************************************

Vars:EP(0),MP(0),BSE(0);

if dayofweek(date)=5 and MP=0 then begin
buy on close;
ep=close;
mp=1;
bse=0;
end;

if MP=1 then exitlong tomorrow at ep + 1 point limit;
if bse>0 and mp[1]=1 and h[1]>=(EP[1] + 1 point) then begin
mp=0;ep=0;bse=0;
end;

if mp<>0 and mp=mp[1] then bse=bse+1;

print(date:8:0," MP: ",MP:1:0," EP: ",EP:4:4," BSE: ",BSE:2:0);
if date=lastcalcdate then print("PointValue: ",pointvalue," BigPointValue: 
",bigpointvalue);