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,892 / 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?

  #1 (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

How to gradually close a position?

Hi guys,

After couple years of searching I am completely confused. Does Easy Language allow to close a position gradually?

Let say I sold 15 contracts using the comand

sellshort 15 contracts this bar on close;

Now I want gradually close this position.

Unfortunately, seems that can can partially close position only one time!

After I do

buytocover 3 contracts this bar on close;

and 12 contracts still open, all further buytocover requests are ignored.

There is note regarding this in the documentation:

Exit orders do not pyramid. Once the exit criteria are met and the exit order filled, the order is ignored for that position
until the position is modified (that is, more shares/ contracts are sold or a new short position is established).


But what to do if I dont want to increase the position?

Thanks

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)
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


What platform are you using? Multicharts, Tradestation or something else?

Regards,
ABCTG

Reply With Quote
 
  #4 (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

It should not really matter.

I am using OEC

Reply With Quote
 
  #5 (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

There is a difference in the platforms and you can use different code between TS and MC for example. For OEC I don't know, but if you post your code (not only the two lines from the first post) you are using for the exits I can give it a try.

I posted an example here that might help you.
Regards,
ABCTG

Reply With Quote
 
  #6 (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,

In your example there are two different closing signals. That's why they work.

This is the surrogate example. Hope the idea is clear. You may need to adjust it or find appropriate instrument. It executes only one exit, instead of three.

 
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 total this bar on close
;
        
i+0.1;
    
end;
end 

Reply With Quote
 
  #7 (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

irriss,

I don't think you can avoid using more than one exit in your situation. This would concur with what you posted from the documentation. What is the problem with having several exit orders and making sure they get executed when you want?

Regards,

ABCTG

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

Partial Position Close

Hi, i have seen from a friend of mine this logic ... it is for MT4 ... and it was using a composite logic, with simultaneous moving of Stop Loss levels ... over the partial close ... the site is : Algorithmic Experts | Home
Hope it helps ...
Best Regards - Dimitri

Reply With Quote
 
  #9 (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

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
 
  #10 (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



dimitri View Post
Hi, i have seen from a friend of mine this logic ... it is for MT4 ... and it was using a composite logic, with simultaneous moving of Stop Loss levels ... over the partial close ... the site is : link Algorithmic Experts | Home[/url]
Hope it helps ...
Best Regards - Dimitri

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

Thanks

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

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 07:10 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.13 seconds with 19 queries on phoenix via your IP 54.163.209.109