MetaStock exit code. Need help! - MetaTrader | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > MetaTrader

MetaStock exit code. Need help!
Started:July 13th, 2013 (12:35 PM) by diamondfish Views / Replies:509 / 1
Last Reply:July 13th, 2013 (12:35 PM) Attachments:0

Welcome to

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

MetaStock exit code. Need help!

Old July 13th, 2013, 12:35 PM   #1 (permalink)
Trading Apprentice
Stockholm + Swedem
Futures Experience: Intermediate
Platform: Metastock
Favorite Futures: Stocks
Posts: 4 since Jul 2013
Thanks: 0 given, 0 received

MetaStock exit code. Need help!


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.

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

Last edited by diamondfish; July 13th, 2013 at 02:51 PM.
Reply With Quote

Old July 13th, 2013, 12:35 PM   #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.


Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > MetaTrader > MetaStock exit code. Need help!

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
Webinar: MetaStock Xenith Platform Big Mike Platforms and Indicators 3 April 1st, 2013 04:23 PM
Ninjatrader simple code to exit all L and S positions at a particular time. birdoggg NinjaTrader 2 October 16th, 2012 01:06 AM
Metastock Pivot Lines for Ninjatrader peakskill NinjaTrader Programming 3 February 6th, 2011 07:22 AM
From METASTOCK to Ninja Trader dimitri NinjaTrader Programming 20 November 15th, 2010 10:32 AM
Indicator of Metastock to NinjaTrader dimitri NinjaTrader Programming 9 August 17th, 2010 08:12 AM

All times are GMT -4. The time now is 10:34 PM.

Copyright © 2016 by 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.
no new posts

Page generated 2016-10-25 in 0.06 seconds with 19 queries on phoenix via your IP