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:4,672 / 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 100,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

 
 
Thread Tools
 

How to gradually close a position?

 
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

 
 
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.

 
 
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,778 since Apr 2013
Thanks: 284 given, 1,061 received


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

Regards,
ABCTG

 
 
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

 
 
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,778 since Apr 2013
Thanks: 284 given, 1,061 received

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

 
 
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 

 
 
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,778 since Apr 2013
Thanks: 284 given, 1,061 received

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

 
 
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

 
 
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.

 
 
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

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

 



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



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

September Journal Challenge (sponsored by TopstepTrader)

September

Free Elite Membership: Twitter Tuesday and Facebook Friday!

Tue & Fri
 

Trading with Python: Using Machine Learning w/Ran Aroussi [12:30PM ET]

Elite only

TopstepTrader (TBD)

Sep 25

RandBots (TBD)

Sep 27

Anthony Drager (TBD)

Oct 4
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Close Open Position on Startup MWinfrey NinjaTrader Programming 3 October 19th, 2013 01:36 PM
Close position 10 days after it was opened skorpyo ThinkOrSwim Programming 1 September 20th, 2013 10:55 AM
Ninja Close Position / Close Button / ChartTrader vantojo NinjaTrader Programming 1 October 15th, 2012 05:51 PM
Using TWS, What is the easiest way to close a forex position arjfca IB Trader Workstation 3 April 20th, 2012 08:58 AM
Close position based on day of week guppy EasyLanguage Programming 3 October 21st, 2011 03:31 PM


All times are GMT -4. The time now is 08:22 AM. (this page content is cached, log in for real-time version)

Copyright © 2018 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 2018-09-20 in 0.16 seconds with 14 queries on phoenix