• Get $30 off VIP with code SUMMER30. Ends July 27. Happy trading!

Is there a CAM indicator for ThinkorSwim?


New member
Can anyone convert the language in the box to TOS language? Barbara Star came up with this trading strategy to identify trends and countertrends. Thank you in advance.
Last edited by a moderator:


Well-known member
It so happens that I have a copy of the TOS version of Barbara's Star CAM Indicator in my files. Here it is ... have fun!

# The CAM Indicator
# TASC JAN 2018
# Barbara Star, PhD.
# Translated by HUB v1.4.2018
# Posted by: thuber
# 1.4.2018

input    ADXLength = 10;
input    MACDFastLength = 12;
input    MACDSlowLength = 26;
input    MACDaveragetype = AverageType.WILDERS;
input    ADXaveragetype = AverageType.WILDERS;

def MACDValue = reference MACD( fastLength = MACDFastLength, slowLength = MACDSlowLength, averageType = MACDaveragetype);
def ADXValue = reference ADX(length = ADXLength, averageType = ADXaveragetype);
def MACDRising = MACDValue > MACDValue[1];
def ADXRising = ADXValue > ADXValue[1];

DefineGlobalColor("CAMUPColor", Color.GREEN);
DefineGlobalColor("CAMPBColor", Color.YELLOW);
DefineGlobalColor("CAMDNColor",  Color.RED);
DefineGlobalColor("CAMCTColor",  Color.BLUE);

assignpricecolor(if ADXRising and MACDRising then globalColor("CAMUPColor")
                 else if !ADXRising and !MACDRising then globalColor("CAMPBColor")
                 else if ADXRising and !MACDRising then globalcolor("CAMDNColor")
                 else if !ADXRising and MACDRising then globalcolor("CAMCTColor") else color.white);

Similar threads