[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] Re: Simplified support resistance levels



PureBytes Links

Trading Reference Links

No the reference to future is intentional. I cannot define the turning
points until after they have occurred.
It is not my intention for trading the turning points when they actually
occur due to the above, but to use them as reference for say a breakout
system where the current price move crosses the last resistance level (high
turning point) if this happens within 2 days then I do not consider it a
true turning point in this exercise.

Cheers,
Graham
http://groups.msn.com/ASXShareTrading
http://groups.msn.com/FMSAustralia


-----Original Message-----
From: epintoem [mailto:epintoem@xxxxxxxxx] 
Sent: Friday, 10 October 2003 4:08 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Simplified support resistance levels


Just a simple question....when you use the ref function the values 
you are referencing are +1 shouldnt they be -1 because you would be 
accessing future values.


In amibroker@xxxxxxxxxxxxxxx, "Graham" <gkavanagh@xxxx> wrote:
> Thanks for that Gary, gives me something to try to work them out,
and
> whether I need them.
> 
> Further to this simple support/resistance formula I am looking at
it to work
> out what the retracements are during trends. I am just starting
putting this
> together and look for any input to help simplify or enhance. I see
this as
> being used to determine box sizes for P&F charts, swing points and
setting
> trailing stop levels to name a few.
> 
> Here is what I have so far
> 
> //RETRACEMENTS TO FIND VOLATILITY
> //Graham Kavanagh 10 Oct 2003
> 
> //Find turning points
> top = H==HHV(H,3) AND H>=Ref(H,1) AND H>=Ref(H,2);
> bot = L==LLV(L,3) AND L<=Ref(L,1) AND L<=Ref(L,2);
> 
> //Calculate movement between turning points
> topH = ValueWhen(top,H);
> botL = ValueWhen(bot,L);
> moveup = Ref(botL,-1)<botL;
> movedown = Ref(topH,-1)>topH;
> diffup = IIf( moveup, botL - ValueWhen( moveup, topH ), Null); 
> diffdown = IIf( movedown, topH- ValueWhen( movedown, botL ), Null);
> 
> //Indicator section
> GraphXSpace=5;
> Plot( C, "C", colorLightGrey, styleBar+styleNoLabel ); PlotShapes( 
> (shapeHollowSmallCircle+shapePositionAbove)*top,
colorRed, 0, H
> );
> PlotShapes( (shapeHollowSmallCircle)*bot, colorBlue , 0, L);
> 
> Plot(diffup, "diffup", colorAqua,
styleHistogram+styleLeftAxisScale);
> Plot(diffdown, "diffdown", colorLime,
styleHistogram+styleLeftAxisScale);
> Plot(0, "0", colorBlack, styleLine+styleLeftAxisScale);
> Title = Name()+" "+Date()+ " Volatility, Red dots = peaks, blue =
troughs" +
> ", down move = " + diffup + ", up move = " + diffdown + ", High = "
+ H + ",
> Low = " + L;
> 
> 
> 
> Cheers,
> Graham
> http://groups.msn.com/ASXShareTrading
> http://groups.msn.com/FMSAustralia
> -----Original Message-----
> From: Gary A. Serkhoshian [mailto:serkhoshian777@x...]
> Sent: Friday, 10 October 2003 12:41 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: RE: [amibroker] Simplified support resistance levels
> 
> 
> Hi Graham,
> I forgot to include the PivotLow function on the last send.  Both
are below.
> You'd use the functions like this:
> #pragma nocache
> #include "Wherever you put your afl file with the functions" PH = 
> PivotHigh(3,3); PL = PivotLow(3,3); Plot( C, "C", colorLightGrey, 
> styleBar+styleNoLabel ); Plot( PH, "res", colorRed, 
> styleDots+styleNoLine ); Plot( PL, "sup", colorGreen, 
> styleDots+styleNoLine ); Title = Name() + ", " + Date() + ", Support & 
> Resistance Levels
Support = "
> + PH + ", Resistance = " + PL ;
> 
> If you are using functions embedded in your afl, make sure they are
above
> the code that actually calls them.
> e.g.
> Function Blah(Len);
> {
>  return MoreBlah;
> }
> BL = Blah(5);
> Plot(BL,"BL",colordefault,styleline);
> Hope this helps,
> Gary
> CODE BELOW FOR THE PIVOT LOW/HI FUNCTIONS
> //===== PivotHigh(LeftStr, RightStr) 
====================================
> /*
> SUPPORT & RESISTANCE LEVELS
> Graham Kavanagh 9 Oct 2003
> Returns High value of pivot
> */
> function PivotHigh(LeftStr, RightStr)
> {
> //Find turning points
> top = H == HHV(H,LeftStr+1) AND H == Ref(HHV(H,RightStr+1),
RightStr);
> topH = ValueWhen(top,H);
> return topH;
> }
> //======= PivotLow(LeftStr, RightStr)
====================================
> /*
> SUPPORT & RESISTANCE LEVELS
> Graham Kavanagh 9 Oct 2003
> Returns Low value of pivot
> */
> function PivotLow(LeftStr, RightStr)
> {
> //Find turning points
> BOT = L == LLV(L,LeftStr+1) AND L == Ref(LLV(L,RightStr+1),
RightStr);
> BOTL = ValueWhen(BOT,L);
> return BOTL;
> }
> 
> 
> 
> 
> Graham <gkavanagh@xxxx> wrote:
> Thanks Gary
> That makes it interesting as I have not yet tried the function 
function :) 
> Do you just put the numbers you want into the intital function
setting 
> 
> Eg
> function PivotHigh(2, 4)
> 
> 
> 
> Cheers,
> Graham
> http://groups.msn.com/ASXShareTrading
> http://groups.msn.com/FMSAustralia
> -----Original Message-----
> From: Gary A. Serkhoshian [mailto:serkhoshian777@x...]
> Sent: Friday, 10 October 2003 11:43 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: Re: [amibroker] Simplified support resistance levels
> 
> 
> Hi Graham,
> I just added the ability to have variable right and left strength
and
> converted into a function.  Hope this saves you some work, and
thanks for
> all the posts and code you've contributed.
> Regards,
> Gary
> 
> //==========  PivotHigh(LeftStr, RightStr)
============================
> /*
> SUPPORT & RESISTANCE LEVELS
> Graham Kavanagh 9 Oct 2003
> Returns High value of pivot
> */
> function PivotHigh(LeftStr, RightStr)
> {
> //Find turning points
> top = H == HHV(H,LeftStr+1) AND H == Ref(HHV(H,RightStr+1),
RightStr);
> topH = ValueWhen(top,H);
> return topH;
> }
> 
> 
> Graham <gkavanagh@xxxx> wrote:
> I have been looking at various ways to chart the support resistance 
elevels,
> ultimately to incorporate into various trading systems. Having
attempted
> loops and other methods of differing complexity I pulled back to the 
> simplest of forms, price. Now this is probably already shown 
> somewhere, but will share it
anyway.
> Any comments appreciated
> 
> //SUPPORT & RESISTANCE LEVELS
> //Graham Kavanagh 9 Oct 2003
> 
> //Find turning points
> top = H==HHV(H,3) AND H>=Ref(H,1) AND H>=Ref(H,2);
> bot = L==LLV(L,3) AND L<=Ref(L,1) AND L<=Ref(L,2);
> 
> topH = ValueWhen(top,H);
> botL = ValueWhen(bot,L);
> 
> //Indicator section
> GraphXSpace=5;
> Plot( C, "C", colorLightGrey, styleBar+styleNoLabel );
> Plot( topH, "res", colorRed, styleDots+styleNoLine );
> Plot( botL, "sup", colorGreen, styleDots+styleNoLine );
> 
> Title = Name() + ", " + Date() + ", Support & Resistance Levels
Support = "
> + topH + ", Resistance = " + botL ;
> 
> 
> Cheers,
> Graham
> http://groups.msn.com/ASXShareTrading
> http://groups.msn.com/FMSAustralia
> 
> 
> 
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service. 
> 
> 
> 
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> Yahoo! Groups Sponsor
> 
> 
> 
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service. 
> 
> 
> 
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service. 
> 
> 
> 
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> Yahoo! Groups Sponsor
> ADVERTISEMENT
> 
> 
> 
> 
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/JYdFFC/XP.FAA/ySSFAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/