How to gradually close a position? - EasyLanguage Programming | futures io social day trading
futures io futures trading


How to gradually close a position?
Updated: Views / Replies:2,890 / 17
Created: by irriss 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
 

How to gradually close a position?

  #11 (permalink)
Elite Member
Athens - Greece
 
Futures Experience: Intermediate
Platform: Metastock
 
Posts: 75 since Jul 2010
Thanks: 202 given, 32 received

Hi, again ... what i have seen working has 4 levels of partial position close .... and possibility to move for each level ... the stop loss ...
Thanks
Dimitri

Reply With Quote
 
  #12 (permalink)
Elite Member
Athens - Greece
 
Futures Experience: Intermediate
Platform: Metastock
 
Posts: 75 since Jul 2010
Thanks: 202 given, 32 received


irriss View Post
Yeah, in MT4 it is possible. You need to play with individual orders and it is very flexible.

Thanks

You can try with them if they can do it for you ... according your specifications ...
just a thinking -- Thanks
Dimitri

Reply With Quote
 
  #13 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary


I am afraid but that won't work with Easylanguage.


irriss View Post
I tried that. The problem that the signal name cannot be dynamic.

I can do like

Sellshort ("sig1") 5 contracts this bar on close
Sellshort ("sig2") 5 contracts this bar on close
Sellshort ("sig3") 5 contracts this bar on close


but I cannot generate signal name from a variable.

In my case it has to be dynamic. I dont know how many exit signal I will need at runtime.


Reply With Quote
 
  #14 (permalink)
Trading Apprentice
Singapore
 
Futures Experience: Beginner
Platform: Ninja, MT4, OEC, EL
Favorite Futures: currency futures
 
Posts: 8 since Dec 2013
Thanks: 1 given, 1 received

Actually I found very strange thing.

If you execute my example.

 
Code
                            
vars:   i(0), 

        
p(0);

if(
i=0then
begin
    buy 15 contracts this bar on close
;
    
CurrentAsk;
    
i+0.1;
end
else
begin
    
if(CurrentAsk>p-ithen
    begin
        sell 5 contracts this bar on close
;
        
i+0.1;
    
end;
end 
It will close the position partially and some part of the position remains open. (this is correct)

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


However, if you add keyword total it will do exactly as I want - perform multiple exit.

sell 5 contracts total this bar on close;

But, at the end there is an open position! Could you run it on your platform and confirm whether it is bug in OEC or unclear logic of EL?

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Reply With Quote
 
  #15 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

In Multicharts your code with total added to the exit only exits 5 contracts once.

Regards,
ABCTG

Reply With Quote
 
  #16 (permalink)
Trading Apprentice
Singapore
 
Futures Experience: Beginner
Platform: Ninja, MT4, OEC, EL
Favorite Futures: currency futures
 
Posts: 8 since Dec 2013
Thanks: 1 given, 1 received

Thanks, ABCTG!

So there is no difference with or without total keyword?

Reply With Quote
 
  #17 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

Yes, at least in MC there is none.


irriss View Post
Thanks, ABCTG!

So there is no difference with or without total keyword?


Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #18 (permalink)
Trading Apprentice
Singapore
 
Futures Experience: Beginner
Platform: Ninja, MT4, OEC, EL
Favorite Futures: currency futures
 
Posts: 8 since Dec 2013
Thanks: 1 given, 1 received

Yes, I checked myself also in MC.

It is a bug (or unexpected behavior) in OEC.

Thanks for your great help, ABCTG!

Reply With Quote

Reply



futures io > > > > > How to gradually close a position?

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
Close Open Position on Startup MWinfrey NinjaTrader Programming 3 October 19th, 2013 02:36 PM
Close position 10 days after it was opened skorpyo ThinkOrSwim Programming 1 September 20th, 2013 11:55 AM
Ninja Close Position / Close Button / ChartTrader vantojo NinjaTrader Programming 1 October 15th, 2012 06:51 PM
Using TWS, What is the easiest way to close a forex position arjfca IB Trader Workstation 3 April 20th, 2012 09:58 AM
Close position based on day of week guppy EasyLanguage Programming 3 October 21st, 2011 04:31 PM


All times are GMT -4. The time now is 05:13 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.12 seconds with 19 queries on phoenix via your IP 23.22.136.56