ThinkScript Help - Sell after 2 consecutive down days after buy - ThinkOrSwim Programming | futures io social day trading
futures io futures trading

ThinkScript Help - Sell after 2 consecutive down days after buy
Updated: Views / Replies:837 / 0
Created: by sdean87 Attachments:0

Welcome to futures io.

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

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Thread Tools Search this Thread

ThinkScript Help - Sell after 2 consecutive down days after buy

  #1 (permalink)
Trading Apprentice
Chicago IL/US
Futures Experience: Intermediate
Platform: ThinkorSwim
Favorite Futures: Gold GC
Posts: 1 since Jun 2016
Thanks: 0 given, 0 received

ThinkScript Help - Sell after 2 consecutive down days after buy

Hi all,

After opening a long position I want to only close my position after 2 consecutive down days. The issue I am having is I am using the close price, which is fine, but I want to start assessing my condition from the day I open my position not any previous days because if I buy after it being down 2 days in a row it will close my position the day I open it. I want it to be open for a minimum of 2 days.

I am wondering if I can get the date on which the buy occurs or start the condition 2 days after the buy. I have posted the code below. Thanks in advanced, I really appreciate and help even if you can point me in the right direction.

#if the close price is less than the previous day(indicating down) and the previous day is less than the day before that(indicating down) sell to close my position.

def triggerSell = if((close[0]<close[1]) and (close[1] < close[2]),1,0);

AddOrder(OrderType.SELL_TO_CLOSE, triggerSell, open[-1],10000/open, Color.ORANGE, Color.ORANGE, "Sell @ " + open[-1]);

Reply With Quote


futures io > > > > > ThinkScript Help - Sell after 2 consecutive down days after buy

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

Wyckoff Hunting for Great Risk/Reward Ratio w/Gary Fullett

Elite only

Digging into the Details of iSystems w/Stage 5 & iSystems

Jun 5

Similar Threads
Thread Thread Starter Forum Replies Last Post
Buy Sell Volume disintegrate Traders Hideout 1 September 30th, 2013 11:56 PM
Balance Buy / Sell in Percent liorzuk NinjaTrader 3 August 28th, 2013 09:31 AM
Outside Bar buy or sell ness1g NinjaTrader 7 March 7th, 2012 06:18 PM
[NinjaTrader]    buy sell chart jamfutures Platforms and Indicators 10 July 14th, 2010 07:36 PM
Buy/Sell in an indicator Mindset NinjaTrader Programming 11 October 8th, 2009 09:16 AM

All times are GMT -4. The time now is 02:37 PM.

Copyright © 2018 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
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
Page generated 2018-05-23 in 0.06 seconds with 19 queries on phoenix via your IP