Page 1 of 2

need help with a radar screen indicator please TRO or anyone

Posted: Tue Dec 18, 2007 7:52 am
by balkanbro
Hi everyone!

I just opened a account at TS the other day and all the features are some what overwhelming at the moment for me.

there is a small customization feature i would like to code or add to RS so my RadarScreen can display the data I would like to see.

basically I want to view the distance % or price difference above or below currnet VWAP 1minute just a simple red price/% if below or green price/% above.

I would really appreciatte anyones help here.

Struggling TS user

thanks
balkanbro

PS i posted this in TS froum first and have gotten no response for any members.

Posted: Tue Dec 18, 2007 4:57 pm
by TheRumpledOne
You can use TRO PLOT to do that.

Just change one input to:

CLOSE - VWAP_H

and the other to:

100 * (CLOSE - VWAP_H) / VWAP_H

That will give you difference in both dollars and percent.

If you don't have the VWAP_H function, you can find it in one of the Motherlodes.





Posted: Wed Dec 19, 2007 7:32 am
by balkanbro
my God thank you!! TRO!!!

I will try it tonight or tommorrow and see if it works.

you are great I posted for help in the TS forum the in last 3 days and did not recieve any help whatsoever. :(

bless you my forum friend!!

Posted: Wed Dec 19, 2007 11:05 am
by balkanbro
hmm this seems like I am close to do the calculations but what I wanted to to in dynamically calculate the difference in intraday vwap to durrent price and show the difference in % and price differance. Maybe I am a studip newb. :roll:

for instance

example at 11.30Am ET IBM is at $95.50 current VWAP is at 96.26 during the same time. would RS plot the value of -76cts and plot a red bar and the same would apply to a % figure.

the code above used Colse a an input to this problem. would it be better to use dynamic last instead?

sorry for this studip question this coding is not my cup of tea. :(

Posted: Wed Dec 19, 2007 4:52 pm
by TheRumpledOne
CLOSE and LAST are the same.

Posted: Wed Dec 19, 2007 9:10 pm
by Ali Son
HOW About 2 for 2? I think many will find this contribution useful.

This is a Quarterly Earnings Indicator. It tells you dynamically (warns you using colors on a chart) based on past earnings release dates automatically when the next Quarterly Earnings release date is. If you think it is neat or have found other uses for it, let me know.

And, if anyone could give me assistance in turning into a viable Radarscreen Inidcator for TS, I would appreciate it. It's a little perplexing, but put it on a chart and see how useful it is, as it shows the interplay of earnings releases and stock movements. It works ok I guess (not 100% precise) after months of testing, but would work better as an RS indicator.

Despite, RS's static limitations, the way this is written is applicable for RS with green for earnings "Just released", yellow for "earnings date imminent", pink for earnings "recently released" and red for "not due for a while." That's one way to interpret it, but feel free to interpret whatever way you want.

HERE IS THE CHART CODE:


inputs:
AvgLength( 14 ),
ValueToPlotOnError( 0 ) ; { ValueToPlotOnError is the value that will be plotted
if an error occurs retrieving the EPS value. }

variables:
oSBBFErr0( 0 ),
oSBBFErr1( 0 ),
oSBBFErr2( 0 ),
oSBBFErr3( 0 ),
SBBF0( 0 ),
SBBF1( 0 ),
SBBF2( 0 ),
SBBF3( 0 ),
EarningsTTM( 0 ),
PEBasic( 0 ),
AvgPEBasic( 0 ) ;

oSBBFErr0 = 0 ;
oSBBFErr1 = 0 ;
oSBBFErr2 = 0 ;
oSBBFErr3 = 0 ;
SBBF0 = FundValue( "SBBF", 0, oSBBFErr0 ) ;
SBBF1 = FundValue( "SBBF", 1, oSBBFErr1 ) ;
SBBF2 = FundValue( "SBBF", 2, oSBBFErr2 ) ;
SBBF3 = FundValue( "SBBF", 3, oSBBFErr3 ) ;

if oSBBFErr0 = fdrOk
and oSBBFErr1 = fdrOk
and oSBBFErr2 = fdrOk
and oSBBFErr3 = fdrOk
then
begin
EarningsTTM = SumList( SBBF0, SBBF1, SBBF2, SBBF3 ) ;
if EarningsTTM <> 0 then
PEBasic = Close / EarningsTTM ;
AvgPEBasic = Average( PEBasic, AvgLength ) ;
Plot1( EarningsTTM, "EarningsTTM" ) ;
// Plot1( PEBasic, "PEBasic" ) ;
if CurrentBar > AvgLength then
// Plot2( AvgPEBasic, "AvgPEBasic" ) ;
// Plot2(0);
value1=0; //dummy code
end
else
begin
Plot1( ValueToPlotOnError, "EarningsTTM" ) ;
// Plot2( ValueToPlotOnError ) ;
end ;

//Plot3( 0, "Zero Line" ) ;

// The part above can be found @ https://www.tradestation.com/Discussion ... xactMatch=
/////////////////////////////////////////////////////////////////////////////////////////
// This is the part to estimate the Earning Release Date
Var: BarChange(0), BarDelta(0), PrevBarChange(0), MinBarDelta(0), SumBarDeltas(0), CountBarDeltas(0), AvgBarDelta(0);
var: BarsToChangeMin(0), BarsToChangeAvg(0);
If Barnumber=1 Then MinBarDelta = 999999999999;
if EarningsTTM <> EarningsTTM[1] Then Begin
PrevBarChange=BarChange;
BarChange=BarNumber;
BarDelta = BarChange - PrevBarChange ;
If BarDelta > 50 Then Begin
SumBarDeltas = SumBarDeltas + BarDelta ;
CountBarDeltas = CountBarDeltas + 1 ;
AvgBarDelta = SumBarDeltas / CountBarDeltas ;
If BarDelta < MinBarDelta Then MinBarDelta = BarDelta ;
Print(BarDelta," " , MinBarDelta," " , AvgBarDelta);
End;
End ;

Inputs: DaysAfter(10),
BarsPriorMinDate(9),
BarsPriorAvgDate(4);

if EarningsTTM <> EarningsTTM[DaysAfter] Then SetPlotColor(1,Magenta);
BarsToChangeMin = BarChange + MinBarDelta - BarNumber ;
BarsToChangeAvg = BarChange + AvgBarDelta - BarNumber ;
If BarsToChangeMin < BarsPriorMinDate Then Begin
SetPlotColor(1, Yellow);
SetPlotWidth(1, 4) ;
end;
If BarsToChangeAvg < BarsPriorAvgDate Then Begin
SetPlotColor(1, Green);
SetPlotWidth(1, 5);
End;

Posted: Fri Dec 21, 2007 9:11 am
by balkanbro
TheRumpledOne wrote:CLOSE and LAST are the same.


I just wanted you say thank you so for kll you wo hard work and effecitivly wonderful functions and indicators!! May God got you a life full of health and happniess. and include wealth.

you really have helped us little guys here and I am sure I speak for many if not all you are forum members.

I am truely thankful.

Posted: Fri Dec 21, 2007 11:10 pm
by TheRumpledOne
You're welcome.

Posted: Fri Dec 28, 2007 3:23 am
by balkanbro
TRO

sorry about asking again but I have TS 8.3 and the values for % down or up and dollar figures up/down are all not correct. your method is right but the values on my radarscreen all way off. :( its probably on my side... any recs on what it could be?


even vwap numbers are wrong. :cry:


they have a non indicator slot for in in black letters maybe i could use that

thanks again!

Posted: Fri Dec 28, 2007 8:16 am
by TheRumpledOne
Post a screenshot of the chart and inputs cause I have no idea what you are looking at!