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

Re: Limiting system to one trade per day



PureBytes Links

Trading Reference Links

Owen,

In trying to Limit your trading system to one trade per 
day you are trying to give your system a memory.  The 
only way a computer program can have that is a method 
that is internal to the program (such as a variable
that is set to a value that means TRUE) or external to the
program (such a a file exists if the value is TRUE).

As "normal" Metastock doesn't read an external file 
that I know of, it looks like you're stuck with the idea 
of a variable.  To use a variable it must be unique, so 
I think you would run out of MS allowed variables as 
you would need one variable that could be set to 
TRUE or FALSE for each stock you were scanning.

One way would be to limit youself in the number of 
stocks to scan, then you could keep the scan under 
the MS variable limit and assign one variable to 
each stock.  This is cumbersome and kludgy though.

Probably the best solution is to pay the additional 
money to purchase the developer's package so that 
you can write and compile a DLL to do what 
Metastock cannot.  Given the problem, my choice 
would be to create an emtpy text file and simply 
add the stock ticker to the file if chooosen (maybe 
with a date and time stamp).  Then, part of the 
process of selecting a stock would be to check the 
file to see if it is in the list for today's date.

Now the a previous thoughts are just my limited 
knowledge of MS, and there may be another way 
around this.  Also, I am unable to determine the 
time frame of your operations.  Since it appears 
to be during the same day, and occur multiple 
times during the same day,  I can only assume you 
are attempting to run explorations across real time 
data.  If so then the DLL kit is probably the best 
solution.

Anyone else have any ideas here?

Hope this helps! .............. John

> I'm trying to write a "system" to investigate the best
> response to gap opens, rather than accepting the
> received wisdom and my own casual observations.
> Problem is, I am using a secondary trigger to open the
> trade, rather than just firing on the gap open of the day,
> and the "opening gap" conditions remain true for the
> entire day.  Thus any repeat of the secondary trigger
> sets off another, invalid trade.  Anyone know how I can
> limit the system to fire only the first time the trigger clicks
> after the gap open?  I can't seem to come up with a
> convenient and reliable way to do it.
> 
> Many thanks.
> 
> Owen Davies
> 
>