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

RE: [amibroker] Re: Back up of Custom Indicators



PureBytes Links

Trading Reference Links

/* criteria for high and low pivot */

HP = IIf( H < Ref(H,-1) AND Ref(H ,-1) > Ref(H ,-2) AND Ref(H ,-1) > Ref(H

,-3), 1, 0);

LP = IIf( L > Ref(L ,-1) AND Ref(L ,-1) < Ref(L ,-2) AND Ref(L ,-1) < Ref(L

,-3), 1, 0);

EnableScript("jscript");

<%

result = VBArray(AFL("High")).toArray();

function TrendLine( starti, startv, endi, endv )

{

for( j = starti; j <= endi; j++ )

{

result[ j ] = startv + ( j - starti )*(endv-startv)/(endi-starti);

}

}

High = VBArray(AFL("High")).toArray();

Low = VBArray(AFL("Low")).toArray();

HP = VBArray(AFL("HP")).toArray();

LP = VBArray(AFL("LP")).toArray();

endi = -1;

starti = -1;

dir = 0;

for( i = High.length - 0; i >= 0; i-- )

{

if( dir == 1 && LP[ i ] )

{

TrendLine( i, Low[ i ], endi, endv );

endi = i;

endv = Low[ i ];

dir = -1;

}

else

if( dir == -1 && HP[ i ] )

{

TrendLine( i, High[ i ], endi, endv );

endi = i;

endv = High[ i ];

dir = 1;

}

else

if( dir == 0 && endi == -1 && LP[ i ] )

{

endi = i;

endv = Low[ i ];

dir = -1;

}

else

if( dir == 0 && endi == -1 && HP[ i ] )

{

endi = i;

endv = High[ i ];

dir = 1;

}

}

AFL("Graph0")=result;

%>

Graph0Color=colorRed;

Graph1=Close;

Graph1Style=64;



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