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:628 / 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

Reply
 
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

Reply



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)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

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


All times are GMT -4. The time now is 11:30 PM.

Copyright © 2017 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
Page generated 2017-12-15 in 0.07 seconds with 19 queries on phoenix via your IP 54.163.210.170