log in     sign up for free
 
People avoid looking for good exits because exits do not give them control over the market. However, exits do control something. They control whether you make a profit or a loss, and they control just how big that profit or loss will be. Since they do so much, perhaps they are worthy of a lot more study on the part of most people.
Van K. Tharp
 
 
Home
systems (284)
 
 
Special offer: buy MetaStock (try for free)   |   Reuters QuoteCenter Real-Time Data (get a free month)   |   EOD Data
 

Buy

MetaStock

     (special offer)
 
 
 

Buy

EOD data for MetaStock

     (special offer)
 
 
 

Buy

Realtime data for MetaStock

     (special offer)
 
 
 
 
Formula Library
 
AmiBroker
MetaTrader
MetaStock
TradeStation
Wealth-Lab
NinjaTrader
 
add your formula
System Library
 
 
Account login
Your email:
Password:
 
Log in
New to s4t? Sign up.
If you forgot your password click here.
Search the Web
 
Custom Search

Exit a Long Position

System for: MetaStock


 

 

Views:  1855

Added: February 07, 2007
 
Rate this code:  Rate: 1 Rate: 2 Rate: 3 Rate: 4 Rate: 5
This formula has not been rated yet
 
 

email this link

 
 
Tags: MetaStock, system
 
Your Ad Here
----- Original Message -----
From: Ed Montero
To: metastock@xxxxxxxxxxxxx
Sent: Thursday, April 20, 2000 7:37 AM
Subject: Code for stops
Is there any way to set a moving trailing stop in a MS System based on my own criteria.

Specifically, on my S&P system, I move a trailing stop if a bar in my trade direction finishes in the upper 25% of the bar (if long) or lower 25% of the bar (if short), I move the trailing stop to a few ticks under/over the bar. I may also move it based on other criteria, such as weakening trend, etc. Can you write code to set a stop, or does it have to be set up using the available MS options only.

Thanks for your help,

Ed Montero
emontero@xxxxxxxxxxxxxx

Re: Code for stops

. To: "MetaStock listserver" <metastock@xxxxxxxxxxxxx>
. Subject: Re: Code for stops
. From: "Glen Wallace" <gcwallace@xxxxxxxx>
. Date: Thu, 20 Apr 2000 10:10:02 -0700
. References: <003601bfaad6$05e8cf50$336c83cc@xxxxxxxx>
. Reply-To: metastock@xxxxxxxxxxxxx
. Sender: owner-metastock@xxxxxxxxxxxxx

Ed:

Yes, you can write code to set a stop, but it's not pretty if you need to refer to the entry price or entry date. You also have the problem that the System Tester can only exit your trade on the open, close, high or low of the particular bar. The System Tester's built-in stops allow you to exit at the stop price, but I don't think these are flexible enough for what you have in mind.

If you explain your exit parameters in more detail, someone here can probably make some suggestions. For what you have described, you could exit a long position with:

 

 



Code:

Exit a Long Position

ExitPrice:= If(Close >= High-0.25*(High-Low), Low-AFewTicks, PREV);
Low <= ExitPrice


 





Source: http://purebytes.com/archives/metastock/

 

View similar:

MetaStock System Test 02 - Tema Binary Wave, QStick
Onno's Binary Wave System Test
Fazola MAROC System
Linear Regression System
Displaced Moving Average
Bull Fear/Bear Fear with DX System
Volume Oscillator System w/Optm
Trend Trigger Factor System
RS System No.1
MACDhistogram Trading
...
 
 
all systems for MetaStock
all systems

 

 

Email to friend

Top

 

     
However we try to maintain hiqhest possible level of service - most formulas, oscillators, indicators
and systems are submitted by anonymous users.
Therefore S4T™ does not take any responsibility for it's quality.
If you use any of this information, use it at your own risk. You are responsible for your own trading decisions.
Be sure to verify that any information you see on these pages is correct, and is applicable to your particular trade.
In no case will S4T™ be responsible for your trading gains or losses.
 
Privacy note | (c) copyrights systems4trading.com 2006-2012