Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Profile: ccsjeba
About
User Name: ccsjeba
Groups: Gold User, Member, Platinum User, TeleChart
Rank: Registered User
Real Name:
Location
Occupation:
Interests:
Gender: Gender:
Statistics
Joined: Saturday, May 7, 2011
Last Visit: Tuesday, May 22, 2018 1:46:52 AM
Number of Posts: 13
[0.00% of all post / 0.00 posts per day]
Avatar
Last 10 Posts
Topic: API or data export mechanism
Posted: Thursday, May 8, 2014 10:27:06 AM

Bruce, any hint on "it might be possible to do so using an external macro program of some sort, by automating a copy and paste of all symbols from an EasyScan" what software/how? All I need is the count of the Easyscan results. 

Topic: ATR Trailing Stop
Posted: Friday, March 15, 2013 1:30:37 AM

awesome! thanks Bruce!!

Topic: ATR Trailing Stop
Posted: Wednesday, March 13, 2013 5:25:30 PM

Hello,

I am using the below in ThinkorSwim to plot the ATR Trailing Stop. Is there anyway I can convert this to StockFinder?

 

___________________________________
input trailType = {default modified, unmodified};
input ATRPeriod = 5;
input ATRFactor = 3.5;
input firstTrade = {default long, short};
 
assert(ATRFactor > 0, "'atr factor' must be positive: " + ATRFactor);
 
def HiLo = Min(high - low, 1.5 * Average(high - low, ATRPeriod));
def HRef = if low <= high[1]
    then high - close[1]
    else (high - close[1]) - 0.5 * (low - high[1]);
def LRef = if high >= low[1]
    then close[1] - low
    else (close[1] - low) - 0.5 * (low[1] - high);
def ATRMod = ExpAverage(Max(HiLo, Max(HRef, LRef)), 2 * ATRPeriod - 1);
 
def loss;
switch (trailType) {
case modified:
    loss = ATRFactor * ATRMod;
case unmodified:
    loss = ATRFactor * AvgTrueRange(high, close, low, ATRPeriod);
}
 
rec state = {default init, long, short};
rec trail;
switch (state[1]) {
case init:
    if (!IsNaN(loss)) {
        switch (firstTrade) {
        case long:
            state = state.long;
            trail =  close - loss;
        case short:
            state = state.short;
            trail = close + loss;
        }
    } else {
        state = state.init;
        trail = Double.NaN;
    }
case long:
    if (close > trail[1]) {
        state = state.long;
        trail = Max(trail[1], close - loss);
    }
    else {
        state = state.short;
        trail = close + loss;
    }
case short:
    if (close < trail[1]) {
        state = state.short;
        trail = Min(trail[1], close + loss);
    }
    else {
        state = state.long;
        trail =  close - loss;
    }
}
 
def BuySignal = Crosses(state == state.long, 0, CrossingDirection.Above);
def SellSignal = Crosses(state == state.short, 0, CrossingDirection.Above);
 
plot TrailingStop = trail;
 
TrailingStop.SetPaintingStrategy(PaintingStrategy.POINTS);
TrailingStop.DefineColor("Buy", GetColor(0));
TrailingStop.DefineColor("Sell", GetColor(1));
TrailingStop.AssignValueColor(if state == state.long
    then TrailingStop.color("Sell")
    else TrailingStop.color("Buy"));
 
____________________
 
Thanks,
Charles
Topic: % from a specific date
Posted: Friday, January 18, 2013 3:45:05 PM

Thanks Bruce

Topic: % from a specific date
Posted: Thursday, January 10, 2013 11:01:54 PM

Hello,

Can you please help me with the realcode for calculating the price% from a specific date until close of today? For example, I want a watchlist column showing the %price increase from low of 11/16/2012 to high of today. 

Thanks

Topic: % from 52 week high/low
Posted: Thursday, January 3, 2013 2:07:14 PM

Thanks Bruce

Topic: % from 52 week high/low
Posted: Thursday, January 3, 2013 1:05:53 AM

Hello,

Can you please help me with realcode for plotting two indicators for the active symbol showing the percentage displacement of the bar&#39;s price from its 52 week highs and lows. For example, today SPX is 15.58% from its 52 week low and 0.83% from its 52 week high. I would like to plot this so that I can get historical day for every bar in the chart. 

Thanks. Appreciate it. 

Charles

Topic: ATR Trailing Stop
Posted: Monday, November 26, 2012 7:01:18 PM

Thanks Bruce. But it appears the ATR Trailing Stop that I am looking for is not the same what we have here. 

I was looking for something like what is documented at 

http://team.thinkorswim.com/manual/dark/studies/studies%20library/A-B/ATRTrailingStop.html

I will play around a little more. 

Topic: ATR Trailing Stop
Posted: Saturday, November 24, 2012 11:19:17 AM

Hello,

Can you please help me out with the realcode (for Stockfinder) to calculate ATR Trailing Stop (2 x ATR stop that is calculated on 14 days)?

Thanks,

Topic: PCF Help
Posted: Monday, January 2, 2012 10:25:37 AM
Hello,
Is there a way I can use 'Latest Float' and 'Price Growth Rate 1 Year' in a PCF?
Thanks
Charles