Hey! How do I sell something on the same condition more then once? - futures io
futures io

Hey! How do I sell something on the same condition more then once?

Discussion in TradeStation

    1. trending_up 194 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 1 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

Hey! How do I sell something on the same condition more then once?

(login for full post details)
  #1 (permalink)
New York City
Posts: 7 since Apr 2021
Thanks: 1 given, 0 received

Hey! I am tyring to figure out how to sell something on the same condition more then once on a 1 minute chart. For example If Price crosses below 9EMA sell 50% of my shares. If it has been more then 15 bars since price corssed below 9 EMA and then does it again sell 50% of my shares. Thanks!

Reply With Quote

Can you help answer these questions
from other members on futures io?
Deleting Custom script for the watchlist
MCnet: (Multi-Timeframe) EMA @ Weekly Data on Daily Chart
Price Action Swing Pro NT8
EMA as a trailing stop
Traders Hideout
you cant wait for life is not hard anymore before you de …
Psychology and Money Management
Best Threads (Most Thanked)
in the last 7 days on futures io
The Beast Slayer, Lances NQ Trading Journal
45 thanks
Spoo-nalysis ES e-mini futures S&P 500
22 thanks
Michael Burry warns the Mother of All Crashes is coming
21 thanks
FairX is launching soon
17 thanks
Chart Trader Alternatives ?
14 thanks
(login for full post details)
  #2 (permalink)
toronto canada
Posts: 6 since May 2021
Thanks: 3 given, 2 received

Here is the main logic of what I would code. This assumes that you will sell the balance of your position if the Price is still below 9EMA

If Price crosses below 9EMA AND Var_sharestosell = 100
then begin
sell 50% of my shares;
Var_barnumber = bar number + 15;
Var_sharestosell = 50;

If Price below 9EMA AND bar number >= Var_barnumber AND Var_sharestosell = 50
then begin
sell 50% of my shares;
Var_sharestosell = 0;

// at some point in your code Var_sharestosell will have to be reset to = 100 .... likely when you buy
// This is far from complete but it is a start ...

Reply With Quote

futures io Trading Community Platforms and Indicators TradeStation > Hey! How do I sell something on the same condition more then once?

Last Updated on June 21, 2021

Upcoming Webinars and Events

NinjaTrader Indicator Challenge!


Our 12-year anniversary w/ $$,$$$ prizes (check soon)


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