Friday, July 23, 2010

MetaStock Simulation functions

Simulation functions were introduced with the advent of the Enhanced System Tester in MS version 8.0 and these functions have never been well documented. To my knowledge the only changes that have been made to the EST, other than the addition of a few new systes, are the 8.1 fixes to the various 8.0 problems.

The following function names and comments have been retrieved from the Indicator Builder. Some descriptions are obviously incomplete and that’s the way I found them. I hope this list is helpful. Several examples of systems using the Simulation function can be viewed at www.equis.com/Customer/Resources/ActiveTrader.

Roy

Simulation.CurrentPositionAge The age of the current position in Sell and Buy to Cover formulas.

Simulation.AccountCash The amount of funds in the cash balance of the account.

Simulation.AccountBorrowed The amount of funds in the margin and overdraft balances of the account.

Simulation.AccountReserved The amount of funds in the reserve balance of the account.

Simulation.AccountLongFundsAvailable The amount of leveraged funds available to new long orders.

Simulation.AccountShortFundsAvailable The amount of leveraged funds available to new short orders.

Simulation.CurrentPositionPerformance The closing performance of the current position in Sell and Buy to Cover formulas. Closing performance assumes ..

Simulation.CurrentPositionProfit The closing profit of the current position in Sell and Buy to Cover formulas. Closing profit assumes a ..

Simulation.CurrentPositionValue The closing value of the current position in Sell and Buy to Cover formulas. Closing value assumes a ..

Simulation.PortfolioHighestProfit The highest summary market value of the portfolio to date. Commissions are incorporated into the calculation

Simulation.PortfolioLowestProfit The lowest summary market value of the portfolio to date. Commissions are incorporated into the calculation.

Simulation.LongPositionCount The number of long positions in the portfolio.

Simulation.ProfitableLongPositionCount The number of profitable long positions in the portfolio.

Simulation.ProfitablePositionCount The number of profitable positions in the portfolio.

Simulation.ProfitableShortPositionCount The number of profitable short positions in the portfolio.

Simulation.ShortPositionCount The number of short positions in the portfolio.

Simulation.UnprofitableLongPositionCount The number of unprofitable long positions in the portfolio.

Simulation.UnprofitablePositionCount The number of unprofitable positions in the portfolio.

Simulation.UnprofitableShortPositionCount The number of unprofitable short positions in the portfolio.

Simulation.CurrentPositionPointDifference The points gained or lost in the current position in Sell and Buy to Cover formulas.

Simulation.CurrentPositionSize The size of the current position in Sell and Buy to Cover formulas.

Simulation.PortfolioValue The summary market value of the portfolio. Commissions are incorporated into the calculation.

Simulation.PortfolioProfit The summary profit or loss of the portfolio. Commissions are incorporated into the calculation.

Simulation.BuyOrderCount The total number of buy orders, either open or being considered by the trader.

Simulation.BuyToCoverOrderCount The total number of buy to cover orders, either open or being considered by the trader.

Simulation.LongOrderCount The total number of long orders, either open or being considered by the trader.

Simulation.PositionCount The total number of open positions in the simulation portfolio.

Simulation.OrderCount The total number of orders, either open or being considered by the trader.

Simulation.ClosingOrderCount The total number of position closing orders, either open or being considered by the trader.

Simulation.OpeningOrderCount The total number of position opening orders, either open or being considered by the trader.

Simulation.SellOrderCount The total number of sell orders, either open or being considered by the trader.

Simulation.SellShortOrderCount The total number of sell short orders, either open or being considered by the trader.

Simulation.ShortOrderCount The total number of short orders, either open or being considered by the trader.

Simulation.CurrentPositionIsLeastProfitable True if the current position is the least profitable of the current bias in the portfolio.

Simulation.CurrentPositionIsMostProfitable True if the current position is the most profitable position of the current bias in the portfolio.

Simulation.CurrentPositionIsNewest True if the current position is the newest position of the current bias in the portfolio.

Simulation.CurrentPositionIsOldest True if the current position is the oldest position of the current bias in the portfolio.

2 comments:

Kannan said...

where can i get the tutorial or guide to know about using these simulation functions. Is there any Metastock programming guide available in the market or from Metastock?

Kannan said...

where can i get the tutorial or guide to know about using these simulation functions. Is there any Metastock programming guide available in the market or from Metastock?