Dark Theme
Light Theme
Trading Articles
Article Categories
Article Tools
Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to
register in order to view the content of the threads and start contributing to our community.
It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
How to gradually close a position?
Updated December 6, 2013
Top Posters
looks_one
irriss
with 8 posts (1 thanks)
looks_two
ABCTG
with 6 posts (1 thanks)
looks_3
dimitri
with 3 posts (0 thanks)
looks_4
Quick Summary
with 1 posts (0 thanks)
trending_up
9,210 views
thumb_up
2 thanks given
group
3 followers
forum
17 posts
attach_file
0 attachments
How to gradually close a position?
December 4th, 2013, 11:35 AM
Athens - Greece
Experience: Intermediate
Platform: Metastock
Posts: 76 since Jul 2010
Thanks Given: 202
Thanks Received: 36
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
Can you help answer these questions from other members on NexusFi?
Best Threads (Most Thanked) in the last 7 days on NexusFi
December 4th, 2013, 11:38 AM
Athens - Greece
Experience: Intermediate
Platform: Metastock
Posts: 76 since Jul 2010
Thanks Given: 202
Thanks Received: 36
irriss
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
December 4th, 2013, 11:46 AM
Posts: 2,436 since Apr 2013
Thanks Given: 484
Thanks Received: 1,629
I am afraid but that won't work with Easylanguage .
irriss
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.
December 4th, 2013, 09:09 PM
Singapore
Posts: 8 since Dec 2013
Thanks Given: 1
Thanks Received: 1
Actually I found very strange thing.
If you execute my example.
Code
vars : i ( 0 ),
p ( 0 );
if( i = 0 ) then
begin
buy 15 contracts this bar on close ;
p = CurrentAsk ;
i = i + 0.1 ;
end
else
begin
if( CurrentAsk > p - i ) then
begin
sell 5 contracts this bar on close ;
i = i + 0.1 ;
end ;
end
It will close the position partially and some part of the position remains open. (this is correct)
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?
December 5th, 2013, 10:05 AM
Posts: 2,436 since Apr 2013
Thanks Given: 484
Thanks Received: 1,629
In Multicharts your code with total added to the exit only exits 5 contracts once.
Regards,
ABCTG
December 5th, 2013, 10:09 AM
Singapore
Posts: 8 since Dec 2013
Thanks Given: 1
Thanks Received: 1
Thanks, ABCTG!
So there is no difference with or without total keyword?
December 5th, 2013, 10:12 AM
Posts: 2,436 since Apr 2013
Thanks Given: 484
Thanks Received: 1,629
Yes, at least in MC there is none.
irriss
Thanks, ABCTG!
So there is no difference with or without total keyword?
December 5th, 2013, 08:24 PM
Singapore
Posts: 8 since Dec 2013
Thanks Given: 1
Thanks Received: 1
Yes, I checked myself also in MC.
It is a bug (or unexpected behavior) in OEC.
Thanks for your great help, ABCTG!
Last Updated on December 5, 2013