SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Strategies & Market Trends : TA-Quotes Plus -- Ignore unavailable to you. Want to Upgrade?


To: Debra Orlow who wrote (8304)1/12/1999 11:46:00 AM
From: bdog  Respond to of 11149
 
Debra,

use the appropriate date value...

ie close(0) is today
close(-1) is yesterday

an easy way to find the value is to run this scan and guess at the value for the date you want ... it will print 30 days either side of it...for your reference...

place your best guess after md1:=....

click on cancel after you begin the scan...

( I have not figured an elegant way to stop this scan yet...I guess your input scan could just have one issue in it..)

then a list of dates and their corresponding date value will be listed to use in your date specific scan...

my math is bad so I take two meds and run this scan...>g<
bdog

//input="prescan.lst";
output="day.lst";

integer md1,m;

//********enter value
md1:=-150;
//*************

for m= (md1-30) to (md1+30) step 1 do
println m:8,date(m):12;
next m;

println;
println;



To: Debra Orlow who wrote (8304)1/12/1999 11:47:00 AM
From: TechTrader42  Read Replies (1) | Respond to of 11149
 
Move everything back one day. For example, instead of close(0), make it close(-1). Instead of stochrsi(0)>30, you'd have stochrsi(-1)>30.

If you want to get more adventuresome, sling a for loop in there. For a basic for loop, you need to:

1. Declare the variable:

integer i;

2. Define the loop:

for i = -2 to 0 step 1 do

3. Put i in the scan function:

close(i) or stochrsi(i)

4. Add a "next i" after the print statement.

Here's an example:

output="test.lst";
Daystoload=500;
integer i;

for i = -2 to 0 step 1 do

set stochrsi = 8, 8, 5, e;

if stochrsi(i)>30 and
stochrsi(i-1)<30 then
println symbol , ", ", stochrsi(0);
endif;
next i;




To: Debra Orlow who wrote (8304)1/12/1999 12:18:00 PM
From: unixgeek  Read Replies (1) | Respond to of 11149
 
'nuther question....what is the easiest way to run a scan on a previous date?

Others have answered, so I won't go into detail here, but I've found that when I write my scans, I almost *always* do something like this;

integer today;
today := 0;

...

if (someIndicator(today) > someIndicator(today - 1)) then ...

and so on. The point is that I write most of my scans in terms of "today". That way, if I need to go back and check something from a previous day, I can simply change the today := 0; line to today := -2; // 2 days ago

and everything works as expected. This has saved me lots of time; others mileage may vary.



To: Debra Orlow who wrote (8304)1/12/1999 1:32:00 PM
From: TechTrader42  Read Replies (1) | Respond to of 11149
 
Debra: Maybe the easiest way would be to actually run the scan on a previous date. For example, to get yesterday's values, you could do the scan yesterday. Timeless advice.

Brooke