How to show bars ago cross for MACD - ThinkOrSwim | futures io social day trading
futures io futures trading


How to show bars ago cross for MACD
Updated: Views / Replies:987 / 3
Created: by pollux321 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
 

How to show bars ago cross for MACD

  #1 (permalink)
Trading Apprentice
atlanta
 
Futures Experience: Intermediate
Platform: thinkorswim
Favorite Futures: stocks
 
Posts: 3 since Jan 2015
Thanks: 0 given, 0 received

How to show bars ago cross for MACD

Im trying to add a column to my watchlist that shows the bars ago crossed for the MACD. So if the MACD was bullish crossed 6 bars ago I want a green 6 and a red 6 if it was a bearish cross. That way I can sort my symbols to show symbols that have a crossed the most recent and see the ones that haven't crossed the longest. Any ideas how to do this?

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

pollux321, paste it as custom watchlist query.
 
Code
                            
def fastLength 12;
def slowLength 26;
def MACDLength 9;
def averageType AverageType.EXPONENTIAL;
def Value MovingAverage(averageTypeclosefastLength) - MovingAverage(averageTypecloseslowLength);
def Avg MovingAverage(averageTypeValueMACDLength);
def Diff Value Avg;
def mode = if diff 0 then 1 else -1;
def bullcount = if mode == 1 then bullcount[1] + else  0;
def bearcount = if mode == -1 then bearcount[1] - else 0;
plot line = if mode == 1 then bullcount else bearcount;
line.assignValueColor(if line 0 then color.green else color.red); 


Last edited by growex; April 26th, 2015 at 09:42 AM.
Reply With Quote
 
  #3 (permalink)
Trading Apprentice
atlanta
 
Futures Experience: Intermediate
Platform: thinkorswim
Favorite Futures: stocks
 
Posts: 3 since Jan 2015
Thanks: 0 given, 0 received


Ok I got that working. Is there a way I can make so the numbers sort from lowest to highest not discriminating by bull or bear but still hold colors. Like...

1 (green)
1 (red)
2 (red)
3 (green)


Last edited by pollux321; April 26th, 2015 at 01:09 PM.
Reply With Quote
 
  #4 (permalink)
Elite Member
Trubchevsk
 
Futures Experience: Beginner
Platform: tos
Favorite Futures: stocks
 
Posts: 48 since May 2011
Thanks: 34 given, 64 received


pollux321 View Post
Ok I got that working. Is there a way I can make so the numbers sort from lowest to highest not discriminating by bull or bear but still hold colors. Like...

1 (green)
1 (red)
2 (red)
3 (green)

from line 10 to end...

def bearcount = if mode == -1 then bearcount[1] + 1 else 0;
plot line = if mode == 1 then bullcount else bearcount;
line.assignValueColor(if mode == 1 then color.green else color.red);

Reply With Quote

Reply



futures io > > > > How to show bars ago cross for MACD

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
MACD Zero Cross Color Indicator Needed BigBlue NinjaTrader 8 February 19th, 2014 03:30 PM
Bars Ago in an indicator patbateman NinjaTrader Programming 22 January 13th, 2014 11:17 AM
I am at my witts end, simple MACD Cross over strategy tomlryde Sierra Chart Programming 11 September 8th, 2013 06:50 PM
Scan for Gap Up N Bars Ago idenr ThinkOrSwim Programming 1 April 10th, 2013 10:17 PM
macd cross indicator wanted trdr NinjaTrader Programming 8 October 27th, 2012 04:40 PM


All times are GMT -4. The time now is 11:21 AM.

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-13 in 0.09 seconds with 19 queries on phoenix via your IP 54.227.51.103