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 380 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 125,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: 6 since Feb 2020
Thanks: 2 given, 1 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

Journal Challenge April 2021 results (now extended!):
Competing for $1800 in prizes from Jigsaw
looks_oneMaking a Living with the Microsby sstheo
(385 thanks from 40 posts)
looks_twoSalao's Journalby Salao
(85 thanks from 14 posts)
looks_3Learning to Profit - A journey in algorithms and optionsby Syntax
(59 thanks from 18 posts)
looks_4Deetee’s DAX Trading Journal (time based)by Deetee
(51 thanks from 23 posts)
looks_5Maybe a little bit different journalby Malykubo
(37 thanks from 23 posts)
 
Best Threads (Most Thanked)
in the last 7 days on futures io
The Crude Dude Oil Trading System
100 thanks
futures io site changelog and issues/problem reporting
33 thanks
Help improve the FIO community
26 thanks
Seasonal Trades
26 thanks
Spoo-nalysis ES e-mini futures S&P 500
22 thanks
 
(login for full post details)
  #2 (permalink)
 SMCJB 
Legendary Market Wizard
Houston, TX
 
Experience: Advanced
Platform: Trading Technologies
Broker: Primary Advantage Futures. Also ED&F and Tradestation
Trading: Primarily Energy but also a little GE, GC, SI & Bitcoin
 
Posts: 4,065 since Dec 2013
Thanks: 3,371 given, 8,031 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: 6 since Feb 2020
Thanks: 2 given, 1 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
 

Journal Challenge w/$1,800 in prizes!

April

An Introduction to CME Group Micro Bitcoin Futures w/David Lerman

Elite only
     



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