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

[amibroker] Re: Force Index Indicator



PureBytes Links

Trading Reference Links

Great, thank you.

//Martin

--- In amibroker@xxxxxxxxxxxxxxx, "johsun" <johanskatt@xxxx> wrote:
> Hi,
> 
> You could change the demandline/supplyline definitions to the 
> following to avoid plotting them when there is a new high/low:
> 
> supplyline=IIf(x2==0,Null,LineArray(x2,y2,x3,y3,1));
> demandLine=IIf(x0==0,Null,LineArray(x0,y0,x1,y1,1));
> 
> Johan
> 
> 
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "marmal417" <marmal@xxxx> wrote:
> > Yes, that's it! Now it automatically draws the most recent demand 
> > line. I took the liberty to add a supply line by mirroring your 
> code 
> > and making the small changes necessary, but I never understood 
> what I 
> > was doing :-) I noticed a weird thing when this indicator is 
> applied 
> > to a stock making a new all time high. If the most recent 
> pivothigh 
> > is higher than any other pivothigh in the database then a line is 
> > drawn from the bottom in the middle of the chart through the most 
> > recent pivot high. It looks really strange. Can the code be 
> modified 
> > to draw no supplyline when there are no higher pivots to draw the 
> > line from and draw no demand line when there are no lower pivots 
> to 
> > draw the line from?
> > 
> > The basis for the systems I have seen based on TD Lines is that 
> you 
> > buy/cover when the supplyline is exceeded and sell/short when the 
> > demand line is broken. Trendlines let you know in advance the day 
> > before, the value of the trendline for the next trading day by 
> > calculating the slope of the line and adding it to today's value 
> of 
> > the line. Therefore, one can place the orders in the evening as 
> stop 
> > orders so if a line is broken during the day a position is taken. 
> > Anyway, I wrote the values of the lines for the next day in the 
> > title. I realise it's not perfect, because some lines are no 
> longer 
> > valid lines (for example a supply line that has been exceeded 
> etc.). 
> > But more on that later.
> > 
> > There are more improvements to be made, but I think it's getting 
> > there :-)
> > //Martin



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/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 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/amibroker/

<*> 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/