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


Simple trailing stop strategy
Started: by jeemba Views / Replies:2,839 / 2
Last Reply: 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

  #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 02:34 AM.
Reply With Quote
 
  #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.

 
  #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,234 since Apr 2013
Thanks: 199 given, 694 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 > > > > > Simple trailing stop strategy

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

NinjaTrader 8: Tips and Tricks (part 2)

Mar 2
 

An Afternoon With FIO member @michaelleemoore

Elite only
 

Jigsaw Trading: Keys to successfully trading the open

Mar 9

Macro view: Trump Market Risk w/Piers Curran @ Amplify Trading

Elite only

Reading the Psychology of the Market w/Brett Steenbarger & Trading Technologies

Elite only

Hybrid Machine Learning (R and TradeStation) w/Murray Ruggiero

Elite only

Spring Grains Outlook w/Sean Lusk @ Walsh Trading

Elite only
     

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 08:07 PM
Trailing stop indicator Buscador The Elite Circle 3 November 15th, 2012 01:57 PM
Strategy Disables When Trailing Stop Filled graygoat NinjaTrader Programming 2 September 27th, 2012 06:16 PM
Trailing stop following an indicator nanobiotech NinjaTrader Programming 9 October 3rd, 2011 10:50 AM
Trailing stop loss kavin729 NinjaTrader Programming 1 August 20th, 2010 02:17 PM


All times are GMT -4. The time now is 07:46 PM.

no new posts
Page generated 2017-02-26 in 0.07 seconds with 19 queries on phoenix via your IP 54.205.36.165