[tos] Define bodyheight of green candles only? - ThinkOrSwim Programming | futures io social day trading
futures io futures trading


[tos] Define bodyheight of green candles only?
Updated: Views / Replies:1,517 / 11
Created: by Massive l Attachments:7

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
 7  
 
Thread Tools Search this Thread
 

[tos] Define bodyheight of green candles only?

  #1 (permalink)
Elite Member
Portland, OR
 
Futures Experience: None
Platform: tos
Favorite Futures: NQ, SB, 6J, CL, GC
 
Massive l's Avatar
 
Posts: 1,458 since Mar 2011
Thanks: 922 given, 1,822 received

[tos] Define bodyheight of green candles only?

Any ideas? I can't seem to nail it down. Seems simple enough though.

Psychology > Strategy ≥ Money
Reply With Quote
 
  #2 (permalink)
Elite Member
Portland, OR
 
Futures Experience: None
Platform: tos
Favorite Futures: NQ, SB, 6J, CL, GC
 
Massive l's Avatar
 
Posts: 1,458 since Mar 2011
Thanks: 922 given, 1,822 received

@rmejia

Any thoughts on this?

Psychology > Strategy ≥ Money
Reply With Quote
 
  #3 (permalink)
1.Fibs 2.??? 3.Profit
Puerto Rico
 
Futures Experience: Intermediate
Platform: thinkorswim
Broker/Data: TD Ameritrade
Favorite Futures: ES
 
rmejia's Avatar
 
Posts: 384 since Oct 2010
Thanks: 3,597 given, 421 received


Is it only for the last candle or for a series of them; for the last one if close>open would be green then close-open should give the body size. Would need a [1] to go back but it would be moving so once another green one comes up it would change the last given green candle size data.

Reply With Quote
 
  #4 (permalink)
Elite Member
Portland, OR
 
Futures Experience: None
Platform: tos
Favorite Futures: NQ, SB, 6J, CL, GC
 
Massive l's Avatar
 
Posts: 1,458 since Mar 2011
Thanks: 922 given, 1,822 received

I want them added up over a period.

This is what I have. This is green - red.
I want total bodyheight of green for n periods divided by bodyheight of red for n periods

declare lower;
input length = 70;
def green = close > open;
def red = close < open;
def bodyheight = BodyHeight();
plot difference1 = sum(green, length) / Sum(red, length);
PLOT ZeroLine = 1;

Psychology > Strategy ≥ Money
Reply With Quote
 
  #5 (permalink)
1.Fibs 2.??? 3.Profit
Puerto Rico
 
Futures Experience: Intermediate
Platform: thinkorswim
Broker/Data: TD Ameritrade
Favorite Futures: ES
 
rmejia's Avatar
 
Posts: 384 since Oct 2010
Thanks: 3,597 given, 421 received

It's counting something, not sure what it is tho. Was looking for info on counting or series but not much in the thinkscript manual.

Maybe something on this thread can help:
Login | ThinkScripter

Have you looked in the yahoo thinkscript group? There is a crazy amount of info there, best free resource for thinkscript ideas imo.

Reply With Quote
The following user says Thank You to rmejia for this post:
 
  #6 (permalink)
Elite Member
Portland, OR
 
Futures Experience: None
Platform: tos
Favorite Futures: NQ, SB, 6J, CL, GC
 
Massive l's Avatar
 
Posts: 1,458 since Mar 2011
Thanks: 922 given, 1,822 received

It's just taking the sum of all the green candles and dividing it by the sum of the red.
I need the sum of the bodyheight of the green / red.

I'll check yahoo but probably not going to see much. I've already googled it many times.

Psychology > Strategy ≥ Money
Reply With Quote
 
  #7 (permalink)
1.Fibs 2.??? 3.Profit
Puerto Rico
 
Futures Experience: Intermediate
Platform: thinkorswim
Broker/Data: TD Ameritrade
Favorite Futures: ES
 
rmejia's Avatar
 
Posts: 384 since Oct 2010
Thanks: 3,597 given, 421 received

Tried something but it fails on an issue I don't know how, or if possible, with thinkorswim, which is to define specific bars:
plot GreenSum = if green then sum(bodyheight(), length) else double.nan;
plot RedSum = if red then sum(bodyheight(), length) else double.nan;

The issue is the:
def green = close > open;
def red = close < open;

Is checking for the actual live price, so the condition is if right now price is green then plot. Don't know how to reference back historical green and red bars.

Reply With Quote
The following user says Thank You to rmejia for this post:
 
  #8 (permalink)
Elite Member
Trubchevsk
 
Futures Experience: Beginner
Platform: tos
Favorite Futures: stocks
 
Posts: 48 since May 2011
Thanks: 34 given, 64 received

As i'm russian, i can't have a thinkorswim account anymore...my one was banned totally two days ago...
Ok mates...i can not test it but try this recursive fold statement.

input length = 70;
def green = fold i=0 to length with n = 0 do if getvalue(close-open,i length-1)>0 then n+close-open else n;
def red = fold j=0 to length with k = 0 do if getvalue(close-open,j length-1)<0 then k+open-close else k;
plot ratio = green/red;

Please let me know if it works

Reply With Quote
The following user says Thank You to growex for this post:
 
  #9 (permalink)
1.Fibs 2.??? 3.Profit
Puerto Rico
 
Futures Experience: Intermediate
Platform: thinkorswim
Broker/Data: TD Ameritrade
Favorite Futures: ES
 
rmejia's Avatar
 
Posts: 384 since Oct 2010
Thanks: 3,597 given, 421 received

Sorry to hear they are not letting you log into your thinkorswim account.

Pasted the code but getting this:
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Reply With Quote
 
  #10 (permalink)
Elite Member
Trubchevsk
 
Futures Experience: Beginner
Platform: tos
Favorite Futures: stocks
 
Posts: 48 since May 2011
Thanks: 34 given, 64 received



rmejia View Post
Sorry to hear they are not letting you log into your thinkorswim account.

Pasted the code but getting this:
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).



ok...got it...
getvalue(close-open,i,length-1)

there's a comma missed after "i" and "j" in getvalue function

Reply With Quote
The following user says Thank You to growex for this post:

Reply



futures io > > > > > [tos] Define bodyheight of green candles only?

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
Multi period candles for TOS pavman ThinkOrSwim 1 July 26th, 2013 07:15 PM
How to define traps and how to trade them? ghl123 The Elite Circle 2 July 5th, 2013 09:38 AM
NT vs TOS, why is candles size,shape,formation different between these platforms? Rad4633 NinjaTrader 3 October 19th, 2011 10:24 PM
How to define a trend? baruchs Emini Index Futures Trading 18 August 31st, 2011 05:12 AM
How do you define a strong trend arjfca The Elite Circle 15 January 14th, 2011 10:33 AM


All times are GMT -4. The time now is 09:01 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-14 in 0.12 seconds with 20 queries on phoenix via your IP 54.221.73.186