InvestorsHub Logo
Followers 47
Posts 97
Boards Moderated 1
Alias Born 04/09/2002

Re: TREND1 post# 120

Friday, 09/06/2002 11:10:54 AM

Friday, September 06, 2002 11:10:54 AM

Post# of 215
Just a short answer, because I have to run

I have Metastock, which allows looking at historical systems.

I have it too, but couldn't manage to learn how to use it. frown Too complicated, the programming language is too obscure, etc. I find Wealth-Lab much easier and its language is essentially Pascal (which I already know).

Metastock has a limitation, that buys are at "open , high, low or close" only.

Does the system you are using allow buys on triggers, such as buy when price crosses 10 day moving average ?


Uhm, the two things are not related, at least not in Wealth-Lab. In WealthScript, you can specify such a thing like "buy when the price crosses above a 10-dma" very easily:

 
if CrossOver(Bar, #Close, SMASeries(#Close, 10)) then
BuyAtMarket(Bar + 1, 'My Long Signal');


Whether this is end-of-day only or intra-day depends on the time frame Wealth-Lab Desktop has been instructed to operate in. The language works with the concept of "bars" - if you have instructed the product to work with daily charts, the above code will buy at the opening of the next day, if the close of the previous day has crossed above the 10-dma. If you work intra-day using a 60-minute chart, the very same code will trigger a Buy when at the end of a hourly bar, the close is above the 10-hour DMA. And so on.

If you want to mix end-of-day and intra-day signals, you can do that too, although it's a bit more complicated.

Now, unrelated to the above, the language supports two kinds of oders - at market and at limit. The above code, for example, uses an at market order. It will trigger a buy at the next day's opening, no matter where the market opens and the trade will be executed precisely at the opening. However, you could use an at limit order instead, specifying the current value of the 10-dma as the limit - then the trade will be executed during the day, if the intra-day price rises above the specified value. For instance, one could use something like this:

 
if not PositionLong(LastPosition) then
BuyAtStop(Bar + 1, SMA(Bar, #Close, 10));


Note, however, that (unlike MetaStock), Wealth-Lab Desktop is mainly a trading system development and testing tool. It is not meant as a charting software (although it can be used for that, of course) and it is not meant to be used to trade automatically on your behalf (although it can be used for that purpose too, but you'll need a lot of hacks). The company that makes it is in the process of developing a complementing tool designed specifically for automated trading - i.e., you would give it a trading system developed with the first tool, will connect it to a real-time data source and a brokerage account and it will execute the trades automatically. You can do that even now with the current product, if you really know what you're doing (e.g., it supports OLE2 automation, so you can control other applications with it; it can send e-mail alerts; it can be connected to a real-time intra-day quote source, etc.) - because it's not easy and is definitely not for the average user.

Regards,
Vesselin

Join the InvestorsHub Community

Register for free to join our community of investors and share your ideas. You will also get access to streaming quotes, interactive charts, trades, portfolio, live options flow and more tools.