TS SUPPORT
home contacts site map search
MultiCharts MCFX Other Products & Services Support Company

You are here:  Home > Support > Knowledgebase

Knowledgebase


Search in     for   
     
Sharpe Demo [Strategies]

Article/Author: Origin: http://www.traders2traders.com. E-mail: Bob Fulks

Download: Sharpdmo.ela

File Includes:
Function - LastBarOnChart
Function - LastCalcDate
Function - LastCalcTime
Function - Sharpe Demo
Signal - Sharpe Demo
Strategy - Sharpe Demo

Category: Strategy > Sharpe Demo

Description:

Sample usage of the SharpeRatio function for futures trading. The InitValue variable should be equal to the total equity controlled, not the margin balance in the account.

Inputs:

NoOfCont - Number of contracts to trade
PrMode - Print mode

EasyLanguage Code:

INPUTS: 	NOOFCONT(2), 		{NUMBER OF CONTRACTS TO TRADE}

PRMODE(0); {PRINT MODE}

VARS: INITVALUE(0), {INITIAL VALUE OF TRADING ACCOUNT}
NETVALUE(0), {VALUE OF TRADING ACCOUNT OVER TIME}
SHARPE(0); {SHARPE RATIO}

{ESTABLISH VALUE FOR INITIAL ACCOUNT VALUE}
IF CURRENTBAR = 1 THEN
INITVALUE = CLOSE * BIGPOINTVALUE * NOOFCONT;

{SIMPLE TRADING SYSTEM}
IF CLOSE > CLOSE[1] THEN BUY NOOFCONT CONTRACTS NEXT BAR AT MARKET;
IF CLOSE < CLOSE[1] THEN EXITLONG NEXT BAR AT MARKET;

{CALCULATE SHARPE RATIO - USING MONTHLY SAMPLES}
NETVALUE = INITVALUE + NETPROFIT;
SHARPE = SHARPERATIO(4, NETVALUE, 0, PRMODE, TRUE);

Support Menu

Contact Customer Support


Discussion Forum


Online Tutorials


Downloads & Check Version


Knowledgebase

Toll Free

Latest Events

June 29
We are starting beta-testing of MultiCharts 6.0 Beta 4.

September 10
We are glad to announce the release of MultiCharts 5.5!

September 10
Users of MultiCharts's can now subscribe to Barchart's real-time data feeds from $49/m.

February 10
MultiCharts received GOLD in Trade2Win's 2008 Members' Choice Awards.

Devember 8
Free MCFX PRO is now also available with Forex.com




© 1999-2010 TS Support, LLC. All rights reserved.