Big Mike's Trading Forum
 

Go Back   Big Mike's Trading Forum

> Trading Forums > Platforms and Indicators > TradeStation > EasyLanguage Programming


Notices
     

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

Welcome to Big Mike's Trading Forum.

Welcome, Guest!

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

BMT is 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
 
Trading Experience: Intermediate
Platform: Tradestation
Favorite Instrument: 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
 
Trading Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Instrument: ES
 
Posts: 342 since Apr 2013
Thanks: 46 given, 167 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
     

Reply



Tags
code, day, easylanguage, high, learning, market, multicharts, neoticker, new high, open, order, percent, platform, price, programming, puts, simple, stop, strategy, trade, trades, tradestation, trailing, trailing stop
     

Big Mike's Trading Forum > Trading Forums > Platforms and Indicators > TradeStation > EasyLanguage Programming > Simple trailing stop strategy

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads
Thread Thread Starter Forum Replies Last Post
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
Using SuperTrend for trailing stop in a strategy - help needed DarrenH NinjaTrader Programming 12 March 30th, 2010 05:52 AM


All times are GMT -4. The time now is 03:00 AM.

Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Copyright © 2014 by Big Mike Trading. 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 2014-04-17 in 0.11 seconds with 19 queries on atlantis via your IP 54.242.8.162