Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
hello everybody,
You know i found a very interesting indicator while i was on think or swim, currently i am trying to back test the validity of this indicator with trade station but i am having a hell of a time getting the conversion of it..
here is the tos code
thanks nicolas i am going to get this into tradestation double check today and you know what i am a even going to post the stats of this indicator here prolly tonight
sorry to keep posting but here is the completed code
inputs:
Price( Close ),
Length( 8 ),
GridForegroundColor( Black ) ; { Color to use for numbers in RadarScreen cells
when gradient coloring is enabled, that is, when both UpColor and DnColor are
set to non-negative values. }
{ Set either UpColor and/or DnColor to -1 to disable gradient plot coloring.
When disabled, Plot1 color is determined by settings in indicator properties
dialog box. Plot2 (ZeroLine) color always comes from indicator properties
dialog box. }
Variables:
num ( 0 ),
indexN ( 0 ),
accuN ( 0 ),
denom ( 0 ),
indexD ( 0 ),
accuD ( 0 ),
offset ( 0 ),
Pm ( 0 );
accuN = 0;
for indexN = 1 to length+1 begin
if indexN > length then offset = length else offset = indexN;
accuN = accuN + (price - price[offset]) / SquareRoot(indexN);
end;
num = accuN;
accuD = 0;
for indexD = 1 to length+1 begin
accuD = accuD + SquareRoot(indexD);
end;
denom = accuD;
so these are the results on apple daily charts for 3 years.. i started with an account balance of 50,000 and allowed a max allocation of 10,000 dollars per trade and these are for long entries only not short entries i havent gotten to short entry programming yet
buy at .2 sell at -.04 might need another filter to improve accuracy
TradeStation Performance Summary
All Trades
Long Trades
Short Trades
Total Net Profit $36,187.00 $36,187.00 $0.00
Gross Profit $55,050.00 $55,050.00 $0.00
Gross Loss ($18,863.00) ($18,863.00) $0.00
Profit Factor 2.92 2.92 n/a
Roll Over Credit $0.00 $0.00 $0.00
Open Position P/L $1,865.00 $1,865.00 $0.00
Select Total Net Profit $31,074.00 $31,074.00 $0.00
Select Gross Profit $45,465.00 $45,465.00 $0.00
Select Gross Loss ($14,391.00) ($14,391.00) $0.00
Select Profit Factor 3.16 3.16 n/a
Adjusted Total Net Profit $22,278.12 $22,278.12 $0.00
Adjusted Gross Profit $45,162.73 $45,162.73 $0.00
Adjusted Gross Loss ($22,884.61) ($22,884.61) $0.00
Adjusted Profit Factor 1.97 1.97 n/a
Total Number of Trades 67 67 0
Percent Profitable 46.27% 46.27% 0.00%
Winning Trades 31 31 0
Losing Trades 22 22 0
Even Trades 14 14 0
Avg. Trade Net Profit $540.10 $540.10 $0.00
Avg. Winning Trade $1,775.81 $1,775.81 $0.00
Avg. Losing Trade ($857.41) ($857.41) $0.00
Ratio Avg. Win:Avg. Loss 2.07 2.07 n/a
Largest Winning Trade $9,585.00 $9,585.00 $0.00
Largest Losing Trade ($4,472.00) ($4,472.00) $0.00
Largest Winner as % of Gross Profit 17.41% 17.41% n/a
Largest Loser as % of Gross Loss 23.71% 23.71% n/a
Net Profit as % of Largest Loss 809.19% 809.19% n/a
Select Net Profit as % of Largest Loss 694.86% 694.86% n/a
Adjusted Net Profit as % of Largest Loss 498.17% 498.17% n/a
Max. Consecutive Winning Trades 6 6 0
Max. Consecutive Losing Trades 4 4 0
Avg. Bars in Total Trades 9.31 9.31 0.00
Avg. Bars in Winning Trades 12.42 12.42 0.00
Avg. Bars in Losing Trades 10.23 10.23 0.00
Avg. Bars in Even Trades 1.00 1.00 0.00
Max. Shares/Contracts Held 100 100 0
Total Shares/Contracts Held 6800 6800 0
Account Size Required $5,775.00 $5,775.00 $0.00
Total Slippage $0.00 $0.00 $0.00
Total Commission $0.00 $0.00 $0.00
Return on Initial Capital 36.19%
Annual Rate of Return 11.03%
Buy & Hold Return 223.04%
Return on Account 626.61%
Avg. Monthly Return $1,119.18 Std. Deviation of Monthly Return $2,344.43
Return Retracement Ratio 0.50
RINA Index 32.96
Sharpe Ratio 0.40
K-Ratio 2.49
Trading Period 2 Yrs, 9 Mths, 18 Dys
Percent of Time in the Market 79.67%
Time in the Market 2 Yrs, 2 Mths, 23 Dys
Longest Flat Period 30 Dys
Max. Equity Run-up $40,844.00
Date of Max. Equity Run-up 04/10/12 13:00
Max. Equity Run-up as % of Initial Capital 40.84%
Max. Drawdown (Intra-day Peak to Valley)
Value ($11,534.00) ($11,534.00) $0.00
Date 05/18/12 13:00
as % of Initial Capital 11.53% 11.53% 0.00%
Net Profit as % of Drawdown 313.74% 313.74% n/a
Select Net Profit as % of Drawdown 269.41% 269.41% n/a
Adjusted Net Profit as % of Drawdown 193.15% 193.15% n/a
Max. Drawdown (Trade Close to Trade Close)
Value ($5,775.00) ($5,775.00) $0.00
Date 05/22/12 13:00
as % of Initial Capital 5.78% 5.78% 0.00%
Net Profit as % of Drawdown 626.61% 626.61% n/a
Select Net Profit as % of Drawdown 538.08% 538.08% n/a
Adjusted Net Profit as % of Drawdown 385.77% 385.77% n/a
Max. Trade Drawdown ($8,561.00) ($8,561.00) $0.00
All Trades
Total Net Profit $36,187.00 Profit Factor 2.92
Gross Profit $55,050.00 Gross Loss ($18,863.00)
Roll Over Credit $0.00
Open Position Profit/Loss $1,865.00
Select Total Net Profit $31,074.00 Select Profit Factor 3.16
Select Gross Profit $45,465.00 Select Gross Loss ($14,391.00)
Adjusted Total Net Profit $22,278.12 Adjusted Profit Factor 1.97
Adjusted Gross Profit $45,162.73 Adjusted Gross Loss ($22,884.61)
Total Number of Trades 67 Percent Profitable 46.27%
Winning Trades 31 Losing Trades 22
Even Trades 14
Avg. Trade Net Profit $540.10 Ratio Avg. Win:Avg. Loss 2.07
Avg. Winning Trade $1,775.81 Avg. Losing Trade ($857.41)
Largest Winning Trade $9,585.00 Largest Losing Trade ($4,472.00)
Largest Winner as % of Gross Profit 17.41% Largest Loser as % of Gross Loss 23.71%
Net Profit as % of Largest Loss 809.19%
Slct. Net Profit as % of Largest Loss 694.86% Adj. Net Profit as % of Largest Loss 498.17%
Max. Consecutive Winning Trades 6 Max. Consecutive Losing Trades 4
Avg. Bars in Winning Trades 12.42 Avg. Bars in Losing Trades 10.23
Avg. Bars in Total Trades 9.31
Max. Shares/Contracts Held 100 Account Size Required $5,775.00
Total Commission $0.00 Total Slippage $0.00
Return on Initial Capital 36.19% Annual Rate of Return 11.03%
Buy and Hold Return 223.04% Return on Account 626.61%
Avg. Monthly Return $1,119.18 Std. Deviation of Monthly Return $2,344.43
Return Retracement Ratio 0.50 RINA Index 32.96
Sharpe Ratio 0.40 K-Ratio 2.49
Trading Period 2 Yrs, 9 Mths, 18 Dys Percent of Time in the Market 79.67%
Time in the Market 2 Yrs, 2 Mths, 23 Dys Longest Flat Period 30 Dys
Max. Equity Run-up $40,844.00
Date of Max. E. Run-up 04/10/12 13:00 Max. E. Run-up as % of Initial Capital 40.84%
Max. Drawdown (Intra-day Peak to Valley)
Max. Drawdown (Trade Close to Trade Close)
Value ($11,534.00) Value ($5,775.00)
Date 05/18/12 13:00 Date 05/22/12 13:00
as % of Initial Capital 11.53% as % of Initial Capital 5.78%
Net Profit as % of Drawdown 313.74% Net Profit as % of Drawdown 626.61%
Slct. Net Profit as % of Drawdown 269.41% Slct. Net Profit as % of Drawdown 538.08%
Adj. Net Prof as % of Drawdown 193.15% Adj. Net Profit as % of Drawdown 385.77%
Max. Trade Drawdown ($8,561.00)
Long Trades
Total Net Profit $36,187.00 Profit Factor 2.92
Gross Profit $55,050.00 Gross Loss ($18,863.00)
Roll Over Credit $0.00
Open Position Profit/Loss $1,865.00
Select Total Net Profit $31,074.00 Select Profit Factor 3.16
Select Gross Profit $45,465.00 Select Gross Loss ($14,391.00)
Adjusted Total Net Profit $22,278.12 Adjusted Profit Factor 1.97
Adjusted Gross Profit $45,162.73 Adjusted Gross Loss ($22,884.61)
Total Number of Trades 67 Percent Profitable 46.27%
Winning Trades 31 Losing Trades 22
Even Trades 14
Avg. Trade Net Profit $540.10 Ratio Avg. Win:Avg. Loss 2.07
Avg. Winning Trade $1,775.81 Avg. Losing Trade ($857.41)
Largest Winning Trade $9,585.00 Largest Losing Trade ($4,472.00)
Largest Winner as % of Gross Profit 17.41% Largest Loser as % of Gross Loss 23.71%
Max. Consecutive Winning Trades 6 Max. Consecutive Losing Trades 4
Avg. Bars in Winning Trades 12.42 Avg. Bars in Losing Trades 10.23
Avg. Bars in Total Trades 9.31
Max. Shares/Contracts Held 100 Account Size Required $5,775.00
Total Commission $0.00 Total Slippage $0.00
Net Profit as % of Largest Loss 809.19%
Slct. Net Profit as % of Largest Loss 694.86% Adj. Net Profit as % of Largest Loss 498.17%
Max. Drawdown (Intra-day Peak to Valley)
Max. Drawdown (Trade Close to Trade Close)
Value ($11,534.00) Value ($5,775.00)
as % of Initial Capital 11.53% as % of Initial Capital 5.78%
Net Profit as % of Drawdown 313.74% Net Profit as % of Drawdown 626.61%
Slct. Net Profit as % of Drawdown 269.41% Slct. Net Profit as % of Drawdown 538.08%
Adj. Net Prof as % of Drawdown 193.15% Adj. Net Profit as % of Drawdown 538.08%
Max. Trade Drawdown ($8,561.00)
Short Trades
Total Net Profit $0.00 Profit Factor n/a
Gross Profit $0.00 Gross Loss $0.00
Roll Over Credit $0.00
Open Position Profit/Loss $0.00
Select Total Net Profit $0.00 Select Profit Factor n/a
Select Gross Profit $0.00 Select Gross Loss $0.00
Adjusted Total Net Profit $0.00 Adjusted Profit Factor n/a
Adjusted Gross Profit $0.00 Adjusted Gross Loss $0.00
Total Number of Trades 0 Percent Profitable 0.00%
Winning Trades 0 Losing Trades 0
Even Trades 0
Avg. Trade Net Proft $0.00 Ratio Avg. Win:Avg. Loss n/a
Avg. Winning Trade $0.00 Avg. Losing Trade $0.00
Largest Winning Trade $0.00 Largest Losing Trade $0.00
Largest Winner as % of Gross Profit n/a Largest Loser as % of Gross Loss 23.71%
Max. Consecutive Winning Trades 0 Max. Consecutive Losing Trades 0
Avg. Bars in Winning Trades 0.00 Avg. Bars in Losing Trades 0.00
Avg. Bars in Total Trades 0.00
Max. Shares/Contracts Held 0 Account Size Required $0.00
Total Slippage $0.00 Total Commission $0.00
Net Profit as % of Largest Loss n/a
Slct. Net Profit as % of Largest Loss n/a Adj. Net Profit as % of Largest Loss n/a
Max. Drawdown (Intra-day Peak to Valley)
Max. Drawdown (Trade Close to Trade Close)
Value $0.00 Value $0.00
as % of Initial Capital 0.00% as % of Initial Capital 0.00%
Net Profit as % of Drawdown n/a Net Profit as % of Drawdown n/a
Slct. Net Profit as % of Drawdown n/a Slct. Net Profit as % of Drawdown n/a
Adj. Net Prof as % of Drawdown n/a Adj. Net Prof as % of Drawdown n/a
Max. Trade Drawdown $0.00
of note i wonder if there is a command that lets you buy a certain option at the time of long entry