Simple trailing stop strategy - EasyLanguage Programming | futures.io
futures.io futures trading
 

Go Back   futures.io

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > TradeStation > EasyLanguage Programming


Simple trailing stop strategy
Started:July 14th, 2013 (01:29 AM) by jeemba Views / Replies:2,437 / 2
Last Reply:August 2nd, 2013 (07:05 AM) Attachments:0

Welcome to futures.io.

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
     

Reply
 
Thread Tools Search this Thread

Simple trailing stop strategy

Old July 14th, 2013, 01:29 AM   #1 (permalink)
Trading Apprentice
Tampa Florida
 
Futures Experience: Intermediate
Platform: Tradestation
Favorite Futures: GBPUSD
 
Posts: 1 since Jul 2013
Thanks: 0 given, 0 received

Simple trailing stop strategy

I am new to the tradestation platform and learning EasyLanguage.

I am trying to do a simple strategy where on Each day a new high is made, old Sell Stop order is canceled and new Sell stop order with Stop Price at 2% below high is entered.

I do not know why this code does not work.

Inputs: Percentage(2);

//Entry
If Date = 1110316 then
Buy( "Buy" ) next bar at market ;

//Exit
If MarketPosition = 1 then begin
If High[0] > highest(high,BarsSinceEntry) then begin
Setstopposition;
Setpercenttrailing(High - EntryPrice,Percentage(2));
end;
end;


I am using the SPY symbol form 2011-01-01 to 2011-06-30 . My trade is supposed to open on 2011-03-17 and closes on 2011-04-12.

Thanks in advance for any assistance.


Last edited by jeemba; July 14th, 2013 at 01:34 AM.
Reply With Quote
     

Old July 14th, 2013, 01:29 AM   #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.

     

Old August 2nd, 2013, 07:05 AM   #3 (permalink)
 Vendor: abctradinggroup.com 
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,071 since Apr 2013
Thanks: 183 given, 595 received


Hi jeemba,
I am afraid, but the reserved word Setpercenttrailing doesn't work like that. You would need to do something like this:

 
Code
//Exit
If MarketPosition = 1 then begin
If High[0] > highest(high,BarsSinceEntry) then 
 MyStopPrice = High - High * .02;

Sell ("SX") next bar MyStopPrice stop;
end;
You should give MyStopPrice a value when you open the trade, too.

Regards,
ABCTG

Reply With Quote
     
The following user says Thank You to ABCTG for this post:
     

Reply



futures.io > Futures Trading, News, Charts and Platforms > Platforms and Indicators > TradeStation > EasyLanguage Programming > Simple trailing stop strategy

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

FIO Journal Contest with over $2000 in prizes [entire month]

September
 

Jigsaw Trading: Standalone Tools now available

Sep 26

Suri Duddella: The 10 Basic Trading concepts to follow in the Markets (part 2 of 2) [w/book giveaway]

Elite only

Linda Bradford Raschke: agenda TBA [w/book giveaway]

Elite only

Raymond Deux (NinjaTrader): NinjaTrader 8 overview and Q&A

Elite only

FuturesTrader71: agenda TBA (part 4 of 4) [w/book giveaway]

Elite only

Corey Rosenbloom: agenda TBA [w/book giveaway]

Elite only

An Afternoon with FIO trader bobwest

Elite only

NinjaTrader 8: Programming Profitable Trading Edges w/FIO member shodson

Elite only

An Afternoon with FIO trader GFIs1

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Oct TBD
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using SuperTrend for trailing stop in a strategy - help needed DarrenH NinjaTrader Programming 13 June 25th, 2014 07:07 PM
Trailing stop indicator Buscador The Elite Circle 3 November 15th, 2012 12:57 PM
Strategy Disables When Trailing Stop Filled graygoat NinjaTrader Programming 2 September 27th, 2012 05:16 PM
Trailing stop following an indicator nanobiotech NinjaTrader Programming 9 October 3rd, 2011 09:50 AM
Trailing stop loss kavin729 NinjaTrader Programming 1 August 20th, 2010 01:17 PM


All times are GMT -4. The time now is 01:22 AM.

Copyright © 2016 by futures.io. 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-09-27 in 0.06 seconds with 19 queries on phoenix via your IP 50.19.58.155