NexusFi: Find Your Edge


Home Menu

 





MetaStock exit code. Need help!


Discussion in Platforms and Indicators

Updated
    1. trending_up 1,943 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 1 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
diamondfish
Stockholm + Swedem
 
Posts: 4 since Jul 2013
Thanks Given: 0
Thanks Received: 0

Hi,

I'm new to this forum. Seems like a nice place to hang around
I hope I'm posting this in an OK category, I didn't find any for MetaStock.

I want to implement an exit that works like this:
Exit on close the first day a profit can be made, but wait at most five days. (When Close_today is bigger than Close_market_entry, if you understand what I mean.)

This strategy works on all buy signals, and is very simple. BUT, depending on the buy signal, it seems to be very hard to implement. If there are buy signals within the five day period, that will be troublesome. Also, continuous buy signals might interfere, depending on how the code is written.

How can I write code for this?

Or, is it some other way around? I wish it was implemented in MetaStock as an exit strategy, but I haven't found it.

Solved it, solution:
I used the Sell Order tab in the Enhanced System Tester. I found some good parameters I didn't see before.

Quoting 
Simulation.CurrentPositionAge>=5 OR C > ExtFml( "Forum20.Ref", C, Simulation.CurrentPositionAge)


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Ceasefire in Name Only: Three Numbers That Define the Ir …
Prediction Markets & Event Contracts
One Wallet Made $200K in Hours: AP Probes Polymarket Cea …
Prediction Markets & Event Contracts
Q1 2026 Shatters All Derivatives Volume Records -- CME H …
Traders Hideout
Asia Equities Crash Overnight -- Nikkei -5.2%, KOSPI -6. …
Traders Hideout
$500M Riding on World Cup 2026: France/Spain Co-Favored …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks




Last Updated on July 13, 2013


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts