Can you buy 2 contracts back-to-back and then sell them back-to-back? - futures io
futures io



Can you buy 2 contracts back-to-back and then sell them back-to-back?


Discussion in EasyLanguage Programming

Updated
    1. trending_up 3,039 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 150,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
 

Can you buy 2 contracts back-to-back and then sell them back-to-back?

(login for full post details)
  #1 (permalink)
swingbatter
Arlington
 
 
Posts: 18 since Feb 2020
Thanks: 6 given, 2 received

In EasyLanguage Strategy in TradeStation:

//You can buy 2 shares at the same time and sell them at different times (scaling out).
If time=900 then buy 2 shares next bar at market;
If time=902 then sell 1 shares next bar at market;
If time=904 then sell 1 shares next bar at market;

//You can also buy 2 shares in succession and sell them at the same time.
If time=900 then buy 1 shares next bar at market;
If time=902 then buy 1 shares next bar at market;
If time=904 then sell 2 shares next bar at market;

//But it seems you cannot buy 2 shares in succession and sell them at different times:
If time=900 then buy 1 shares next bar at market;
If time=902 then buy 1 shares next bar at market;
If time=904 then sell 1 shares next bar at market;
If time=906 then sell 1 shares next bar at market;
//This strategy actually just sells both shares at 9:04am.

Anyone know how to code this?

Reply With Quote

Can you help answer these questions
from other members on futures io?
Big Mo Indicator for NT8
NinjaTrader
help with take profit several targets
TradeStation
in depth understanding of last, bid, and ask volume in c …
NinjaTrader
How do I create Strategy with the Second Entry indicator
NinjaTrader
NT8 Order Management Strategy
The Elite Circle
 
 
(login for full post details)
  #2 (permalink)
 SMCJB 
Legendary Market Wizard
Normally Houston TX but currently travelling a lot
 
Experience: Advanced
Platform: TT and Stellar
Broker: Primary Advantage Futures. Also ED&F and Tradestation
Trading: Primarily Energy but also a little Equities, Fixed Income, Metals and Crypto.
 
Posts: 4,747 since Dec 2013
Thanks: 4,063 given, 9,563 received

I think its

 
Code
If time=900 then buy ("BUY1") 1 shares next bar at market;
If time=902 then buy ("BUY2") 1 shares next bar at market;
If time=904 then sell ("SELL1") from Entry ("BUY1") 1 shares next bar at market;
If time=906 then sell ("SELL2") from Entry ("BUY2") 1 shares next bar at market;

Reply With Quote
The following 2 users say Thank You to SMCJB for this post:
 
(login for full post details)
  #3 (permalink)
swingbatter
Arlington
 
 
Posts: 18 since Feb 2020
Thanks: 6 given, 2 received



SMCJB View Post
I think its

 
Code
If time=900 then buy ("BUY1") 1 shares next bar at market;
If time=902 then buy ("BUY2") 1 shares next bar at market;
If time=904 then sell ("SELL1") from Entry ("BUY1") 1 shares next bar at market;
If time=906 then sell ("SELL2") from Entry ("BUY2") 1 shares next bar at market;

Spot on! Thank you!

Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > Can you buy 2 contracts back-to-back and then sell them back-to-back?


Last Updated on April 6, 2021


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
     



Copyright © 2023 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), 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