Profit Target as Percent Gain - EasyLanguage Programming | futures io social day trading
futures io futures trading


Profit Target as Percent Gain
Updated: Views / Replies:4,840 / 4
Created: by ascr Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • 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.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Profit Target as Percent Gain

  #1 (permalink)
Just starting out...
Toronto
 
Futures Experience: Intermediate
Platform: Multicharts
 
Posts: 3 since Oct 2010
Thanks: 0 given, 0 received

Profit Target as Percent Gain

Help would be greatly appreciated.
I'm trying to exit a position at a 15% gain using easyLanguage.
Here's the relevant pieces of the code:

condition3 = Price > (EntryPrice * 1.15);
if condition3 then
Sell("LE 15% Gain") This Bar On Close;

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)
Just starting out...
Toronto
 
Futures Experience: Intermediate
Platform: Multicharts
 
Posts: 3 since Oct 2010
Thanks: 0 given, 0 received

Answer
This post has been selected as an answer to the original posters question Answer


After poking around I found the solution. I'm rolling the account, so I'm using "initialcapital+netprofit" elsewhere in the code. Here's the relevent code:

variables: x(0);
x = initialcapital+netprofit;
setprofittarget (x * 0.15);

Reply With Quote
 
  #4 (permalink)
Banned: trolling
NYC + NY / USA
 
Futures Experience: Advanced
Platform: "I trade, therefore, I AM!"; Theme Song: "Atomic Dog!"
Favorite Futures: EMD, 6J, ZB
 
kronie's Avatar
 
Posts: 798 since Oct 2009
Thanks: 216 given, 498 received

excellent answer,

I have often wondered how to set a percentage as a target instead of a fixed interval as such

perhaps this can be shown with examples of how to implement it?

thanks

Reply With Quote
 
  #5 (permalink)
 Vendor: www.systemtradersuccess.com 
Gurnee, IL
 
Futures Experience: Advanced
Platform: TradeStation
Broker/Data: TradeStation
Favorite Futures: Futures
 
Posts: 46 since Apr 2010
Thanks: 17 given, 92 received


kronie View Post
excellent answer,

I have often wondered how to set a percentage as a target instead of a fixed interval as such

perhaps this can be shown with examples of how to implement it?

thanks

I did not really test the following code, but it should put you in the right direction. The code example show two ways of determining a dynamic profit target. The first is based off the current ATR while the second is a percentage gain of current net profit.

 
Code
Input:
    ATRfactor( 2 ),
    ATRLength( 13 ),
    PrcntGain( 15 );
    
Variables:
    ProfitTarget$(0),
    ATR(0),
    MP(0);

ATR = AvgTrueRange( ATRLength );
MP = MarketPosition;

// Enter new trade on golden cross

If ( average(Close, 50) crosses over Average( Close, 200 ) ) Then
    Buy ("Gold Cross") next bar at market
Else If ( average(Close, 50) crosses under Average( Close, 200 ) ) then
    Sell ("Death Cross") next bar at market;
    
If ( MP = 1 ) Then
Begin
    // Set profit based upon Average True Range
    ProfitTarget$ = ATRfactor * ATR * BigPointValue;
    SetProfitTarget( ProfitTarget$ );
End;


If ( MP = 1 ) And ( NetProfit > 0 ) Then
Begin
    // Set profit based upon percent profit
    ProfitTarget$ = ( NetProfit * PrcntGain / 100 );
    SetProfitTarget( ProfitTarget$ );
End;

Reply With Quote

Reply



futures io > > > > > Profit Target as Percent Gain

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
profit target strategy on tradestation dirtybird EasyLanguage Programming 3 November 23rd, 2010 01:07 AM
Target Profit Beats Street on Improved Sales Quick Summary News and Current Events 0 August 18th, 2010 09:00 AM
What is the best way to work out your profit target? pyekorn Psychology and Money Management 14 July 22nd, 2010 02:14 AM
where should profit target be placed? anniebee321 Beginners and Introductions 9 June 7th, 2010 08:38 AM
Protecting the cumulative profit target in an automated strategy nanobiotech NinjaTrader Programming 4 April 1st, 2010 12:24 PM


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

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@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 2017-12-18 in 0.08 seconds with 27 queries on phoenix via your IP 54.92.201.232