PureBytes Links
Trading Reference Links
|
Hello and good day,
I have a trendline formula that I use as an intraday resistance
trendline, it produces a positively sloped trendline.
I would like to use this code to scan daily bars to find the lowest low
bar over a 50 day period. This lowest low bar will then produce a daily
resistance trendline as opposed to an intraday resistance trendline. I
have not been able to figure out how to modify the start and endbars to
do this.
Any suggestions would be greatly appreciated.
Thank you,
Kind regards
Geary
here is the present code:
SetBarsRequired(99999,99999);
x = BarIndex()+1;
xx = DateNum()!=Ref(DateNum(),-1);
startbar = LastValue(ValueWhen(xx, x, 1)-2); // Yesterday's end bar
4:00
endBar = LastValue(ValueWhen(xx, x, 1)-1); // todays start bar 9:30
sb=IIf(O>C,C,O); //startbar origin the lower of the open or close
OCabsval= abs(O-C); //absolute value of the (O-C) = the rise
O = sb; //startbar price
startOC = OCabsval [startBar]; //absolute value of the(O-C) of start
bar
startO = O [startBar]; //Open of start bar
endOC = startO [endBar]+ startOC ; //endbar higher by absolute value
of the(O-C) of the start bar
trendLine = LineArray(startBar, startO, endBar, endOC,3);
Plot( trendline, "Trendline 1bar rise/run", colorRed, styleNoRescale |
styleDots );
------------------------------------
**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
*********************
TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
*********************
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
*********************************
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|