Sell Shares from 2 positions - futures io
futures io futures trading



Sell Shares from 2 positions


Discussion in EasyLanguage Programming

Updated by ABCTG
    1. trending_up 592 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 8 replies
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • 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 and simple.

-- Big Mike, Site Administrator

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

 
Search this Thread
 

Sell Shares from 2 positions

(login for full post details)
  #1 (permalink)
Montclair
 
 
Posts: 17 since Nov 2018
Thanks: 0 given, 0 received

I am looking to find the easylanguage code that will allow me to sell shares from 2 different entries.

For example:

I have 2 long entries and at a certain point I want to sell half of my entire position ( the combined shares from both strategies). The only way I have found to do this is put in 2 sell orders and effectively sell the position twice and pay double commision

Is there a way around this?

Reply With Quote

Can you help answer these questions
from other members on futures io?
Where is the link to download GomiRecorder?
NinjaTrader
Webinar: Linda Bradford Raschke Dealing with August burnout and Trader Camaraderie
The Elite Circle
T​​​​​​radestation datafeed (real time and historical) to NT8
NinjaTrader
Horizontal Line Indicator
Platforms and Indicators
Looking freelancer for MT4 Indicator
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Excited and scared at the same time
13 thanks
What Is the Source of Your Edge??
12 thanks
CME to launch Nasdaq-100 Volatility Index (VolQ) futures
12 thanks
https://ivytrusts.com/ SCAM ALERT
11 thanks
financial transaction tax
10 thanks
 
(login for full post details)
  #3 (permalink)
Hamburg Germany
 
Experience: Advanced
Platform: Multicharts, Tradestation
Broker: DTN IQ
Trading: ES
 
Posts: 2,192 since Apr 2013
Thanks: 385 given, 1,428 received


jessehhhh,

take a look at the reversed word "total" as this can be used to accomplish what you have in mind.

Additionally the Advanced Example Strategies in the below topic might be helpful for you:
https://community.tradestation.com/Discussions/Topic.aspx?Topic_ID=112094

Regards,

ABCTG

Follow me on Twitter Visit my Facebook Reply With Quote
 
(login for full post details)
  #4 (permalink)
Montclair
 
 
Posts: 17 since Nov 2018
Thanks: 0 given, 0 received

I tried that and it still didn't work.

The end of my code was "Sell Total Currentshares*.5 next bar at...

It still only sold from one of the positions.

Am I using this word wrong?

Reply With Quote
 
(login for full post details)
  #5 (permalink)
Hamburg Germany
 
Experience: Advanced
Platform: Multicharts, Tradestation
Broker: DTN IQ
Trading: ES
 
Posts: 2,192 since Apr 2013
Thanks: 385 given, 1,428 received

jessehhhh,

can you post code that can be used to reproduce what you are seeing?

Did the exit close out half of your entire position?

Regards,

ABCTG

Follow me on Twitter Visit my Facebook Reply With Quote
 
(login for full post details)
  #6 (permalink)
Montclair
 
 
Posts: 17 since Nov 2018
Thanks: 0 given, 0 received

I don't have access to it currently but can later.

When i use that exit code it sells half of my first position only. For example if I bought 10 shares in my first entry and 10 in the second, that code sells 5 shares.

If this isn't enough info I will post my code later for help.

Thank You

Reply With Quote
 
(login for full post details)
  #7 (permalink)
Hamburg Germany
 
Experience: Advanced
Platform: Multicharts, Tradestation
Broker: DTN IQ
Trading: ES
 
Posts: 2,192 since Apr 2013
Thanks: 385 given, 1,428 received

jessehhhh,

yes, the code should provide more insights into why this is not working on your end.

Regards,

ABCTG

Follow me on Twitter Visit my Facebook Reply With Quote
 
(login for full post details)
  #8 (permalink)
Montclair
 
 
Posts: 17 since Nov 2018
Thanks: 0 given, 0 received

After doing some digging on the Forum link you sent me I found out that it is not possible to do in an automated way.

In order for you to have 1 exit instead of to I need to turn on Adopt the real-world position in the Automation tab. However this has to be done after a position is entered and the chart needs to be refreshed which is not viable for my strategy.

Reply With Quote
 
(login for full post details)
  #9 (permalink)
Hamburg Germany
 
Experience: Advanced
Platform: Multicharts, Tradestation
Broker: DTN IQ
Trading: ES
 
Posts: 2,192 since Apr 2013
Thanks: 385 given, 1,428 received

jessehhhh,

it sounds like the entries are on different charts or not by a strategy on one chart (like a manual entry and one strategy exit). In that case it's correct that one strategy would have to be made aware of the entire position first.

One way to approach this might be to combine the two strategies into one and apply it to one chart only.

Regards,

ABCTG

Follow me on Twitter Visit my Facebook Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > Sell Shares from 2 positions


November 8, 2018


Upcoming Webinars and Events
 

Dealing with burnout w/Linda Bradford Raschke

Elite only
     



Copyright © 2020 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