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

[amibroker] Reporting in multiple rows



PureBytes Links

Trading Reference Links




I have been trying to get a report from an 
exploration of multiple results for multiple price ranges. Getting the report 
was enough, but with 7 variable results and up to 10 price ranges the number of 
columns became rediculous and frustratingly cumbersome to view. I came up with a 
solution I will share, and maybe someone can help with something more elegant 
than my rudimentory methods. I have not included the code in full as it is about 
600 lines, just the exploration report coding, so you could put any 
variables in there. My report is just a single value at the end of the 
exploration, so I have used the last n days to display the report. for mine I 
set the AA window range as n=7 last quotations.<FONT 
color=#008000>
 
Cheers,Graham<A 
href="">http://groups.msn.com/ASXShareTrading<A 
href="">http://groups.msn.com/FMSAustralia 

 
bar = BarCount - 1 - 
BarIndex();
 
x[BarCount-7] = LastValue( 
AvMajorRisingMovePercentAll );y[BarCount-7] = LastValue( 
AvMajorFallingMovePercentAll );x[BarCount-6] = LastValue( 
AvMediumRisingMovePercentAll );y[BarCount-6] = LastValue( 
AvMediumRisingPullBackPercentAll );x[BarCount-5] = LastValue( 
AvMediumFallingMovePercentAll );y[BarCount-5] = LastValue( 
AvMediumFallingPullbackPercentAll );x[BarCount-4] = LastValue( 
AvMinorRRMovePercentAll );y[BarCount-4] = LastValue( 
AvMinorRRPullbackPercentAll );x[BarCount-3] = LastValue( 
AvMinorRFMovePercentAll );y[BarCount-3] = LastValue( 
AvMinorRFPullbackPercentAll );x[BarCount-2] = LastValue( 
AvMinorFRMovePercentAll );y[BarCount-2] = LastValue( 
AvMinorFRPullbackPercentAll );x[BarCount-1] = LastValue( 
AvMinorFFMovePercentAll );y[BarCount-1] = LastValue( 
AvMinorFFPullbackPercentAll );
 <FONT face=Arial 
color=#000000 size=3>
A1 = ValueWhen(bar,BarCount-1);A2 = 
ValueWhen(bar,BarCount-2);A3 = ValueWhen(bar,BarCount-3);A4 = 
ValueWhen(bar,BarCount-4);A5 = ValueWhen(bar,BarCount-5);A6 = 
ValueWhen(bar,BarCount-6);A7 = ValueWhen(bar,BarCount-7);
 
//Bars = bars used in the exploration//R=Rising / F=Falling//First 
R/F = Major, second R/F = Medium//M = Move is in direction of the next 
higher trend//P = Pullback against the next higher trend//Move is on 
direction of the trend//Description is 6=Major / 5=MediumRR / 4=MediumFF / 
3=MinorRR / 2=MinorRF / 1=MinorFR / 0=MinorFF
 
Filter = BarIndex()==A1 OR BarIndex()==A2 OR BarIndex()==A3 OR 
BarIndex()==A4 OR BarIndex()==A5 OR BarIndex()==A6 OR 
BarIndex()==A7;AddColumn(bar,"Descrpn",1);AddColumn(x,"M("+Price[LowLevel]+"-"+Price[HighLevel]+")",1.1);AddColumn(y,"P("+Price[LowLevel]+"-"+Price[HighLevel]+")",1.1);
 
z1=0;z2=0;//Values for Each Price Range between Dates 
Selectedfor( n=LowLevel; n<=HighLevel-1; n++ ){
 
//this is the loop coding area

z1[BarCount-7] = 
LastValue(AvMajorRisingMovePercent);z2[BarCount-7] = 
LastValue(AvMajorFallingMovePercent);z1[BarCount-6] = 
LastValue(AvMediumRisingMovePercent);z2[BarCount-6] = 
LastValue(AvMediumRisingPullbackPercent);z1[BarCount-5] = 
LastValue(AvMediumFallingMovePercent);z2[BarCount-5] = 
LastValue(AvMediumFallingPullbackPercent);z1[BarCount-4] = 
LastValue(AvMinorRRMovePercent);z2[BarCount-4] = 
LastValue(AvMinorRRPullbackPercent);z1[BarCount-3] = 
LastValue(AvMinorRFMovePercent);z2[BarCount-3] = 
LastValue(AvMinorRFPullbackPercent);z1[BarCount-2] = 
LastValue(AvMinorFRMovePercent);z2[BarCount-2] = 
LastValue(AvMinorFRPullbackPercent);z1[BarCount-1] = 
LastValue(AvMinorFFMovePercent);z2[BarCount-1] = 
LastValue(AvMinorFFPullbackPercent);
AddColumn( z1, "M("+Price[n]+"-"+Price[n+1]+")", 1.1 
);AddColumn( z2, "P("+Price[n]+"-"+Price[n+1]+")", 1.1 );
}






Yahoo! Groups Sponsor


  ADVERTISEMENT











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 the Yahoo! Terms of Service.