[amibroker] plot line btn higher high and lower low of RSI [1 Attachment]

2010-09-07 Thread afzal hossain
Friends
Could you please guys help me to draw line between higher high and lower low 
value of RSI?
Please find the attach as example.
RegardsAfzal


  

Re: [amibroker] plot line btn higher high and lower low of RSI

2010-09-07 Thread afzal hossain
 );


}




  Title = {{VALUES}} + \\c07  +  ( + perfast + ) + \\c36  +  ( 
+ permed + ) + \\c55  +  ( + perslow + );


  

  GraphXSpace = Param( GraphXSpace, 5, 0, 30, 0.5 );








Le 07/09/2010 08:47, afzal hossain a écrit :

   
  
  


  

  
Friends
  

  
  Could you please guys help me to draw line
between higher high and lower low value of RSI?
  

  
  Please find the attach as example.
  

  
  Regards
  Afzal

  

  
  


  
  
  
  



  




 





 



  











  

Re: [amibroker] plot line btn higher high and lower low of RSI

2010-09-07 Thread afzal hossain
Hi Reinsley
I tried the following linePlot( C, RSIc( + n + ), colorgreen, styleline );
instead of
Plot( C, RSIc( + n + ), 1, 64 );
and looks like it is working just not perfectly matching with clouds below 30.
any way good works Reinsley
RegardsAfzal

--- On Tue, 9/7/10, afzal hossain cube_...@yahoo.com wrote:

From: afzal hossain cube_...@yahoo.com
Subject: Re: [amibroker] plot line btn higher high and lower low of RSI
To: amibroker@yahoogroups.com
Date: Tuesday, September 7, 2010, 12:31 AM















 
 



  



  
  
  Thanks Reinsley for your effort.
Is it possible to plot on line instead of candlestick?
RegardsAfzal

--- On Tue, 9/7/10, reinsley reins...@yahoo.fr wrote:

From: reinsley reins...@yahoo.fr
Subject: Re: [amibroker] plot line btn higher high and lower low of RSI
To: amibroker@yahoogroups.com
Date: Tuesday, September 7, 2010, 12:16 AM















 
 




  
  
  

  
  


Hi, 



Here is something you can simplify to get what you want.



Best regards



// RSIc trendlines w fct


  // Original : Dimitri Tsokakis


  // mod by Reinsley
  



  procedure RSIc( n )


{


C = RSIa( C, n );


O = RSIa( O, n );


H = RSIa( H, n );


H = IIf( H  Max( C, O ), Max( C, O ), H );


L = RSIa( L, n );


L = IIf( L  Min( C, O ), Min( C, O ), L );


}






n = Param( n, 9, 2, 30, 1 );//RSI
sensitivity


RSIc( n );


  Plot( C, RSIc( + n + ), 1, 64 );


RSIlevHi = Param( RSIlevHi , 70, 2, 100, 1 );


RSIlevLo = Param( RSIlevLo , 30, 2, 100, 1 );


  SetChartOptions( 0, 0, ChartGrid30 | ChartGrid70);


  PlotOHLC(
  O,
  H,
  50, C, , IIf( C  50, colorPink, colorPaleGreen ), styleCloud | 
styleClipMinMax | styleNoLabel, RSIlevLo , RSIlevHi );


  PlotOHLC(
  O,
  50, L, C, , IIf( C  50, colorPaleGreen, colorPink ), styleCloud | 
styleClipMinMax | styleNoLabel, RSIlevLo , RSIlevHi );


  Plot(50,,colorBrown,
  styleLine |styleDashed|styleNoLabel);


  //PlotGrid(50);


  // fast SR RSIc


perfast = Param( perfast, 10, 3, 100, 1 );//trendlines
sensitivity


VertShiftFast = Param( vs+, 4, 1, 20, 1 );// vertical
shift +


  // medium SR RSIc


permed = Param( permed, 40, 3, 100, 1 );//trendlines
sensitivity


VertShiftMed = Param( vso, 7, 1, 20, 1 );// vertical
shift 0


  // Slow SR RSIc


perslow = Param( perslow, 50, 3, 100, 1 );//trendlines
sensitivity


VertShiftslow = Param( vst, 11, 1, 20, 1 );// vertical
shift T




  procedure SupRes( per, Vs, symb, Colorline )


{


x = Cum( 1 );


s1 = L;


s11 = H;


pS = TroughBars( s1, per, 1 ) == 0;


endt = LastValue( ValueWhen( pS, x, 1 ) );


startt = LastValue( ValueWhen( pS, x, 2 ) );


dtS = endt - startt;


endS = LastValue( ValueWhen( pS, s1, 1 ) );


startS = LastValue( ValueWhen( pS, s1, 2  ) );


aS = ( endS - startS ) / dtS;


bS = endS;


trendlineS = aS * ( x  - endt ) + bS;


Plot( IIf( x  startt - 10, trendlineS, -1e10 ), , Colorline, 1 );


PlotText( symb, endt - 1 , endS - Vs , Colorline );// last point 1 
support //green


PlotText( symb, startt - 1 , startS - Vs , Colorline );// first 
point 2 support


pR = PeakBars( s11, per, 1 ) == 0;


endt1 = LastValue( ValueWhen( pR, x, 1 ) );


startt1 = LastValue( ValueWhen( pR, x, 2 ) );


dtR = endt1 - startt1;


endR = LastValue( ValueWhen( pR, s11, 1 ) );


startR = LastValue( ValueWhen( pR, s11, 2  ) );


aR = ( endR - startR ) / dtR;


bR = endR;


trendlineR = aR * ( x  - endt1 ) + bR;


Plot( IIf( x  startT1 - 10, trendlineR, -1e10 ), , Colorline, 1 
);


PlotText( symb, endt1 - 1 , endR + Vs - 2, Colorline );//
last point 1 resistance // red


PlotText( symb, startt1 - 1 , startR + Vs - 2 , Colorline );//
first point 2 resistance


}




SRfast = SupRes( perfast, VertShiftFast, +, colorYellow
);


SRmed = SupRes( permed

Re: [amibroker] 52 week high

2010-08-29 Thread afzal hossain
YOU can use this tow for high and low
Plot(HHV(H,Param(Hi-Days,30,7,365,1)),DysHi,colorGold,33);Plot(LLV(L,Param(Lo-Days,30,7,365,1)),DysLo,colorYellow,33);


--- On Sun, 8/29/10, prasantaroy36 prasantaro...@yahoo.com wrote:

From: prasantaroy36 prasantaro...@yahoo.com
Subject: [amibroker] 52 week high
To: amibroker@yahoogroups.com
Date: Sunday, August 29, 2010, 11:15 AM















 
 



  



  
  
  Hi, 



i want to plot as text 52 week high date. So, what will be the afl logic ?



Pl,help.



Thanks






 





 



  











  

Re: [amibroker] 52 week high

2010-08-29 Thread afzal hossain
Sorryuse this
Plot(HHV(H,Param(Hi-Days,365,7,365,1)),DysHi,colorGold,33);Plot(LLV(L,Param(Lo-Days,365,7,365,1)),DysLo,colorYellow,33);
--- On Sun, 8/29/10, afzal hossain cube_...@yahoo.com wrote:

From: afzal hossain cube_...@yahoo.com
Subject: Re: [amibroker] 52 week high
To: amibroker@yahoogroups.com
Date: Sunday, August 29, 2010, 3:26 PM















 
 



  



  
  
  YOU can use this tow for high and low
Plot(HHV(H,Param(Hi-Days,30,7,365,1)),DysHi,colorGold,33);Plot(LLV(L,Param(Lo-Days,30,7,365,1)),DysLo,colorYellow,33);


--- On Sun, 8/29/10, prasantaroy36 prasantaro...@yahoo.com wrote:

From: prasantaroy36 prasantaro...@yahoo.com
Subject: [amibroker] 52 week high
To: amibroker@yahoogroups.com
Date: Sunday, August 29, 2010, 11:15 AM















 
 




  
  
  Hi, 



i want to plot as text 52 week high date. So, what will be the afl logic ?



Pl,help.



Thanks






 



 








  


 





 



  











  

[amibroker] Feeding Fundamental Data [1 Attachment]

2010-08-27 Thread afzal hossain
Hi All
Can any body tell me how can i feed attached fundamental data in to 
Amibroker?This data I have collected from a website. Amibroker does not have a 
data feeder for www.dsebd.org
I use a local data feeder for intraday and eod from .csv file.
ThanksAfzal


  

Re: [amibroker] AFL Query

2010-08-22 Thread afzal hossain
Try this if it works for you | may be i am wrong that you want
_SECTION_BEGIN(Price-Volume Change 
%);PlotOHLC(Open,High,Low,Close,,IIf(CloseOpen, colorBrightGreen,colorRed), 
styleCandle);
//price 
selectiononedy=Param(Day,1,1,100,1);pronedybfr=LastValue(Ref(C,-onedy));prccngonedy=LastValue(C)-pronedybfr;pronedyttlCngPrcntg=prccngonedy*100/LastValue(C);
//volume 
selectionVoonedybfr=LastValue(Ref(V,-onedy));Vocngonedy=LastValue(V)-Voonedybfr;voonedyttlcngprcntg=Vocngonedy*100/LastValue(V);

Title 
=Name()+\n+Open:+LastValue(O)+\n+Close:+LastValue(C)+\n+High:+LastValue(H)+\n+Low:+LastValue(L)+\n+EncodeColor(colorWhite)+
 Price Changed +Onedy+: + 
EncodeColor(IIf(pronedyttlcngprcntg0,colorGreen,colorRed)) 
+pronedyttlcngprcntg+%+\n+EncodeColor(colorWhite)+Volume Changed +Onedy+ 
: 
+EncodeColor(IIf(voonedyttlcngprcntg0,colorGreen,colorRed))+Voonedyttlcngprcntg+%;
_SECTION_END();Buy=pronedyttlcngprcntg1; //you can customize your value here 
instead of 1
regardsafzal


--- On Sun, 8/22/10, Meg Nath meg.s...@gmail.com wrote:

From: Meg Nath meg.s...@gmail.com
Subject: [amibroker] AFL Query
To: amibroker@yahoogroups.com
Date: Sunday, August 22, 2010, 8:22 AM















 
 



  



  
  
  
Hi All,

I was trying to generate an AFL which indicated buy signals when there is a 1% 
change b/w the close price of adjacent bars in an 1 minute chart. It worked in 
EOD data but failed in 1minute data please help. Code is written below! thanks 
in advance




_SECTION_BEGIN(Unnamed 17);
for(i=0;iBarCount-1;i++)
{
a=Close[i];

b=Close[i+1];
Ca=b-a;
d=.01*a;
if(Cad)
{
Buy1=Close[i+1];
Buy=Buy1;
}
}
_SECTION_END();









 





 



  











  

Re: [amibroker] Req Exploration code for finding stocks with price crossed today above 20ema and

2010-08-20 Thread afzal hossain
Hi ford
I am not a expert, i am learning
try this
EMA13=EMA(C,13);
r1 = Param( Fast avg, 12, 2, 200, 1 );r2 = Param( Slow avg, 26, 2, 200, 1 
);r3 = Param( Signal avg, 9, 2, 200, 1 );a=MACD(r1,r2);b=Signal(r1,r2,r3);
Buy=CEMA13 AND ab;Sell=CEMA13 AND ab;
Filter=Buy OR 
Sell;AddTextColumn(WriteIf(Buy,Buy,Sell),Status,1,IIf(Buy,colorYellow,colorYellow),IIf(Sell,colorRed,colorGreen));

regardsafzal 

--- On Fri, 8/20/10, ford7k for...@yahoo.com wrote:

From: ford7k for...@yahoo.com
Subject: [amibroker] Req Exploration code for finding stocks with price crossed 
today above 20ema and
To: amibroker@yahoogroups.com
Date: Friday, August 20, 2010, 9:29 AM















 
 



  



  
  
  Hi experts



I run my update of eod and try to locate only those stocks that made a price 
cross above 13Ema and MACD crossed SIGNAL.

When I tried, I  AM GETTING ALL OLD THINGS,(THAT MADE CROSSOVER MANY DAYS AGO) 
MAKING IT DIFFICULT TO LOCATE ONLY THOSE THAT satisfied both criteria JUST 
TODAY.



How to fix this exploration requirement,please guide me with needed code lines



I tried



Buy = C  EMA(C,13) AND MACD  SIGNAL;

SELL = C EMA(C,13) AND MACD  SIGNAL;

Filter = Buy or Sell;



Thanks for help

regards

ford






 





 



  











  

Re: [amibroker] Re: Req Exploration code for finding stocks with price crossed today above 20ema and

2010-08-20 Thread afzal hossain
Thanks 
I has a difference, and make good sense
regardsafzal

--- On Fri, 8/20/10, booker_1324 booker_1...@yahoo.com wrote:

From: booker_1324 booker_1...@yahoo.com
Subject: [amibroker] Re: Req Exploration code for finding stocks with price 
crossed today above 20ema and
To: amibroker@yahoogroups.com
Date: Friday, August 20, 2010, 2:36 PM















 
 



  



  
  
  In your description you said:

price cross above 13Ema



But your formula states:

Buy = C  EMA(C,13)



There is a difference



Try this 

Buy = cross(C, EMA(C,13))



--- In amibroker@yahoogroups.com, ford7k for...@... wrote:



 Hi experts

 

 I run my update of eod and try to locate only those stocks that made a price 
 cross above 13Ema and MACD crossed SIGNAL.

 When I tried, I  AM GETTING ALL OLD THINGS,(THAT MADE CROSSOVER MANY DAYS 
 AGO) MAKING IT DIFFICULT TO LOCATE ONLY THOSE THAT satisfied both criteria 
 JUST TODAY.

 

 How to fix this exploration requirement,please guide me with needed code lines

 

 I tried

 

 Buy = C  EMA(C,13) AND MACD  SIGNAL;

 SELL = C EMA(C,13) AND MACD  SIGNAL;

 Filter = Buy or Sell;

 

 

 Thanks for help

 regards

 ford








 





 



  











  

Re: [amibroker] Help with code afl- color macd

2010-08-18 Thread afzal hossain
Lets try it
_SECTION_BEGIN(MACD);r1 = Param( Fast avg, 12, 2, 200, 1 );r2 = Param( 
Slow avg, 26, 2, 200, 1 );r3 = Param( Signal avg, 9, 2, 200, 1 
);a=MACD(r1,r2);b=Signal(r1,r2,r3);Plot(a,MACD,IIf(ab,colorGreen,colorRed),styleLine|styleThick);Plot(b,SIGNAL,colorAqua,styleDashed);Plot(
 a-b, MACD Histogram, ParamColor(Histogram color, colorAqua ), styleNoTitle 
| ParamStyle(Histogram style, styleHistogram | styleNoLabel, maskHistogram ) 
);_SECTION_END();

regardsafzal
--- On Wed, 8/18/10, ford7k for...@yahoo.com wrote:

From: ford7k for...@yahoo.com
Subject: [amibroker] Help with code afl- color macd
To: amibroker@yahoogroups.com
Date: Wednesday, August 18, 2010, 10:16 AM















 
 



  



  
  
  Seniors and afl experts



Hope you might have seen  www.xforecaster.com

There a chart is used witnh maxium scale of chart is +450 and -450 looks like

http://www.xforecaster.com/



I checked up forextsd etc forums and found that these charts contain 
colormacd.here there is no histogram.

just macd line and signal line,the chart shows top of scale 450,then 0-line and 
bottom of chart as -450.

I took macd afl and chosen custom and set max and min as needed. but the macd 
line and signal line still show very low values in disproportion to scale of 
450 to -450.



How to fix this problem and get a enhanced macd with wider scale,along with 
macdline and signal line showing bigger values on new large scale!



please help



thanks

regards

ford






 





 



  











  

Re: [amibroker] Help with code afl- color macd

2010-08-18 Thread afzal hossain
Try this one also---histogram color changed
_SECTION_BEGIN(MACD);r1 = Param( Fast avg, 12, 2, 200, 1 );r2 = Param( 
Slow avg, 26, 2, 200, 1 );r3 = Param( Signal avg, 9, 2, 200, 1 
);a=MACD(r1,r2);b=Signal(r1,r2,r3);
Plot(a,MACD,IIf(ab,colorGreen,colorRed),styleLine|styleThick);Plot(b,SIGNAL,colorAqua,styleDashed);Plot(a-b,Histgram,IIf(a-b0,colorBrightGreen,colorBrown),styleHistogram|styleThick);

_SECTION_END();
regardsafzal
--- On Wed, 8/18/10, afzal hossain cube_...@yahoo.com wrote:

From: afzal hossain cube_...@yahoo.com
Subject: Re: [amibroker] Help with code afl- color macd
To: amibroker@yahoogroups.com
Date: Wednesday, August 18, 2010, 10:42 AM















 
 



  



  
  
  Lets try it
_SECTION_BEGIN(MACD);r1 = Param( Fast avg, 12, 2, 200, 1 );r2 = Param( 
Slow avg, 26, 2, 200, 1 );r3 = Param( Signal avg, 9, 2, 200, 1 
);a=MACD(r1,r2);b=Signal(r1,r2,r3);Plot(a,MACD,IIf(ab,colorGreen,colorRed),styleLine|styleThick);Plot(b,SIGNAL,colorAqua,styleDashed);Plot(
 a-b, MACD Histogram, ParamColor(Histogram color, colorAqua ), styleNoTitle 
| ParamStyle(Histogram style, styleHistogram | styleNoLabel, maskHistogram ) 
);_SECTION_END();

regardsafzal
--- On Wed, 8/18/10, ford7k for...@yahoo.com wrote:

From:
 ford7k for...@yahoo.com
Subject: [amibroker] Help with code afl- color macd
To: amibroker@yahoogroups.com
Date: Wednesday, August 18, 2010, 10:16 AM















 
 




  
  
  Seniors and afl experts



Hope you might have seen  www.xforecaster.com

There a chart is used witnh maxium scale of chart is +450 and -450 looks like

http://www.xforecaster.com/



I checked up forextsd etc forums and found that these charts contain 
colormacd.here there is no histogram.

just macd line and signal line,the chart shows top of scale 450,then 0-line and 
bottom of chart as -450.

I took macd afl and chosen custom and set max and min as needed. but the macd 
line and signal line still show very low values in disproportion to scale of 
450 to -450.



How to fix this problem and get a enhanced macd with wider scale,along with 
macdline and signal line showing bigger values on new large scale!



please help



thanks

regards

ford






 



 








  


 





 



  











  

Re: [amibroker] Help with code afl- color macd

2010-08-18 Thread afzal hossain
the scale is just a matter of multiplication, you can try your own number from 
1to 100 or even 1000 or use Close or open or low or high
example
instead of a=MACD(r1,r2);b=Signal(r1,r2,r3);
usea=MACD(r1,r2)*100;b=Signal(r1,r2,r3)*100;
or a=MACD(r1,r2)*c;b=Signal(r1,r2,r3)*c;
but use same values for a and b
regards



--- On Wed, 8/18/10, ram vel r...@yahoo.com wrote:

From: ram vel r...@yahoo.com
Subject: Re: [amibroker] Help with code afl- color macd
To: amibroker@yahoogroups.com
Date: Wednesday, August 18, 2010, 9:06 PM















 
 



  



  
  
  Dear afzal
 
thanks,
Ford wanted that 
macd,signal values displayed on right axis must be not 0.000123 but 120 or 70 
in a bigger scale.
the histogram value,macd value,signalvalue scale to be changed. how it is to be 
done-was his problem.
Anyways,your afl looks good.
 
 
We were looking for zerolag ADX.
if any ideas please help
keep your good work going on.
 
regards
rv
--- On Wed, 8/18/10, afzal hossain cube_...@yahoo.com wrote:


From: afzal hossain cube_...@yahoo.com
Subject: Re: [amibroker] Help with code afl- color macd
To: amibroker@yahoogroups.com
Date: Wednesday, August 18, 2010, 12:51 PM


  





Try this one also---histogram color changed



_SECTION_BEGIN(MACD);
r1 = Param( Fast avg, 12, 2, 200, 1 );
r2 = Param( Slow avg, 26, 2, 200, 1 );
r3 = Param( Signal avg, 9, 2, 200, 1 );
a=MACD(r1,r2);
b=Signal(r1,r2,r3);


Plot(a,MACD,IIf(ab,colorGreen,colorRed),styleLine|styleThick);
Plot(b,SIGNAL,colorAqua,styleDashed);
Plot(a-b,Histgram,IIf(a-b0,colorBrightGreen,colorBrown),styleHistogram|styleThick);




_SECTION_END();


regards
afzal
--- On Wed, 8/18/10, afzal hossain cube_...@yahoo.com wrote:


From: afzal hossain cube_...@yahoo.com
Subject: Re: [amibroker] Help with code afl- color macd
To: amibroker@yahoogroups.com
Date: Wednesday, August 18, 2010, 10:42 AM


  





Lets try it



_SECTION_BEGIN(MACD);
r1 = Param( Fast avg, 12, 2, 200, 1 );
r2 = Param( Slow avg, 26, 2, 200, 1 );
r3 = Param( Signal avg, 9, 2, 200, 1 );
a=MACD(r1,r2);
b=Signal(r1,r2,r3);

Plot(a,MACD,IIf(ab,colorGreen,colorRed),styleLine|styleThick);
Plot(b,SIGNAL,colorAqua,styleDashed);
Plot( a-b, MACD Histogram, ParamColor(Histogram color, colorAqua ), 
styleNoTitle | ParamStyle(Histogram style, styleHistogram | styleNoLabel, 
maskHistogram ) );
_SECTION_END();




regards
afzal
--- On Wed, 8/18/10, ford7k for...@yahoo.com wrote:


From: ford7k for...@yahoo.com
Subject: [amibroker] Help with code afl- color macd
To: amibroker@yahoogroups.com
Date: Wednesday, August 18, 2010, 10:16 AM


  

Seniors and afl experts

Hope you might have seen www.xforecaster.com
There a chart is used witnh maxium scale of chart is +450 and -450 looks like
http://www.xforecaster.com/

I checked up forextsd etc forums and found that these charts contain 
colormacd.here there is no histogram.
just macd line and signal line,the chart shows top of scale 450,then 0-line and 
bottom of chart as -450.
I took macd afl and chosen custom and set max and min as needed. but the macd 
line and signal line still show very low values in disproportion to scale of 
450 to -450.

How to fix this problem and get a enhanced macd with wider scale,along with 
macdline and signal line showing bigger values on new large scale!

please
 help

thanks
regards
ford






  


 





 



  











  

Re: [amibroker] Req please help by correcting bar count error in the afl

2010-08-17 Thread afzal hossain
HiMay be this will help you
_SECTION_BEGIN(INIT);
SetChartOptions(0,chartShowArrows|chartShowDates);  ScanLookBack = 
Param(Scan Lookback, 2, 1, 25 );   fraction= IIf(StrRight(Name(),3) == 
, 3.2, 3.2);
_SECTION_END();
_SECTION_BEGIN(Price);
SetChartOptions(0,chartShowArrows|chartShowDates);  _N(Title = 
StrFormat({{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g,Close %g 
(%.1f%%) Vol  +WriteVal( V, 1.0 ) + {{VALUES}}, O, H, L, C,SelectedValue( 
ROC( C, 1 )) )); Plot( C, _DEFAULT_NAME(), 
IIf(CloseOpen,colorBrightGreen,colorRed) , styleNoTitle | ParamStyle(Style) 
|GetPriceStyle() ); _SECTION_END();
_SECTION_BEGIN(Up Trend Line);
UTValue1=LastValue(Trough(L,0.5,2));    UTValue2=LastValue(Trough(L,0.5,1));
UTBar1=BarCount - 1 - LastValue(TroughBars(L,0.5 ,2));  UTBar2=BarCount - 1 - 
LastValue(TroughBars(L,0.5 ,1));  UpTrendLine = LineArray( UTBar1, 
UTValue1, UTBar2,UTValue2, 1 );UTLine = LineArray( UTBar1, UTValue1, 
UTBar2,UTValue2, 0 ); Plot( UpTrendLine , _DEFAULT_NAME(), 
colorGreen,styleLine | styleNoTitle |styleNoLabel);    Plot( UTLine , 
_DEFAULT_NAME(), colorGreen,styleLine | styleNoTitle |styleNoLabel); 
_SECTION_END();

_SECTION_BEGIN(Down Trend Line);
DTValue1=LastValue(Peak(H,0.5 ,2)); DTValue2=LastValue(Peak(H,0.5 
,1)); DTBar1=BarCount - 1 - LastValue(PeakBars(H,0.5 ,2));
DTBar2=BarCount - 1 - LastValue(PeakBars(H,0.5 ,1));    DownTrendLine = 
LineArray( DTBar1, DTValue1, DTBar2,DTValue2, 1 );  DTLine = LineArray( 
DTBar1, DTValue1, DTBar2,DTValue2, 0 );
Plot( DownTrendLine ,_DEFAULT_NAME(), colorRed,styleLine | styleNoTitle 
|styleNoLabel); Plot( DTLine ,_DEFAULT_NAME(), colorRed,styleLine | 
styleNoTitle |styleNoLabel);PlotText(PV =  + 
WriteVal(DTValue2 ,fraction), LastValue(BarIndex())+2,(DTValue2 ), colorRed);   
 PlotText(TV =  + WriteVal(UTValue2,fraction), 
LastValue(BarIndex())+2,UTValue2, colorGreen);  PlotOHLC( UpTrendLine , 
UpTrendLine , DownTrendLine , DownTrendLine , ,ColorBlend( colorGreen, 
colorLightYellow, 0.9 ), styleCloud | styleNoRescale); Plot(LineArray( 
DTBar2, DTValue2, BarCount,DTValue2, 0 ),,colorRed);  Plot(LineArray( UTBar2, 
UTValue2, BarCount,UTValue2, 0 ),,colorGreen);
_SECTION_END();
_SECTION_BEGIN(Pivot);
YH = TimeFrameGetPrice(H, inDaily, -1);   // yesterdays 
high  YL = TimeFrameGetPrice(L, inDaily, -1);   //
  low YC = TimeFrameGetPrice(C, inDaily, -1); 
  //  close   TO = TimeFrameGetPrice(O, inDaily); 
  // current day open
//Normal Pivot  PP = (YH + YL + YC) / 3;R1 = (2 * PP) - YL; 
R2 = PP + (YH - YL);R3 = YH + 2*(PP-YL);S1 = (2 * PP) - YH; S2 = PP 
- (YH - YL);S3 = YL - 2*(YH - PP) ; _SECTION_END();
_SECTION_BEGIN(Title);
Title = EncodeColor(colorWhite)+ Date() +    Close =  + 
EncodeColor(colorRed)+Close + EncodeColor(colorWhite) +      Open =  
+ EncodeColor(colorWhite) + O +    EncodeColor(colorWhite) +      
High =  + EncodeColor(5) + H + EncodeColor(colorWhite) +       Low = 
 + EncodeColor(colorRed) + L +  EncodeColor(colorWhite) +      Volume 
=  + EncodeColor(colorWhite) + V +\n\n+   
EncodeColor(colorWhite) + Pivot Point=  + EncodeColor(colorWhite) + PP +  
EncodeColor(colorWhite) +      Day's Open=  + EncodeColor(colorWhite) 
+ TO+\n\n+EncodeColor(colorGreen) + If days open is greater than 
Pivot Point, marketis in uptrend AND \n+EncodeColor(colorRed)+if days Open is 
less than PivotPoint, market is in downtrend +\n\n+  
EncodeColor(colorRed) + R1=  + EncodeColor(colorWhite) + R1 + 
EncodeColor(colorRed) +   R2=  + EncodeColor(colorWhite) + R2 +   
EncodeColor(colorRed) +   R3=  + EncodeColor(colorWhite) + R3 +\n+  
EncodeColor(colorGreen) + S1=  + EncodeColor(colorWhite) + S1 +   
EncodeColor(colorGreen) +   S2=  + EncodeColor(colorWhite) + S2 + 
EncodeColor(colorGreen) +   S3=  + EncodeColor(colorWhite) + S3 
+\n+EncodeColor( colorWhite) +  _  ___  ___  
___+\n; _SECTION_END();
_SECTION_BEGIN(Target); 
CBuy = Cross(C,DownTrendLine);  CSell = Cross(UpTrendLine ,C);
baratbuy = ValueWhen(CBuy ,BarIndex()) ;baratsell = 
ValueWhen(CSell ,BarIndex()) ;
PlotShapes(shapeUpTriangle* CBuy ,colorBlue,O,L);   
PlotShapes(shapeDownTriangle * CSell ,colorRed,O,H);

_SECTION_END();
_SECTION_BEGIN(Auto);

Buy  = ( CBuy ) AND  ( (BarCount - baratbuy )=ScanLookBack );  Sell = 
( CSell ) AND  ( (BarCount - baratsell )=ScanLookBack  ) ;
price = C[BarCount-1];
AlertIf(Buy,,Buy @+C+  Price @ Trigger=+price,1); 
AlertIf(Sell,,Sell @+C+  Price @ Trigger=+price,2);
Filter =  Buy OR Sell ;
Var = 

[amibroker] Buy Sell scanning afl code for Amibroker

2010-08-16 Thread afzal hossain
Friends
Please help me to write a code for the following condition.
- x is a value which increase or decrease with price- I have four straight 
line of value 30, 50, 65 and 70
--- Case1---  when x cross from bellow to above 30 is a buy signal warning 
and  when x cross 50 is a buy signal,  when x cross 50 and do not cross 65 
and value return back to 50 or just bellow 50 is a sell signal.
--- Case2---when x value cross 65 and do not cross 70 and return back to 65 
or just bellow 65 is a sell signal.
---Case3--when x value cross 70 and upper limit is sky(unlimited) and value 
return back to 70 or just bellow 70 is a sell signal.

Summery: 1 time buy warning, 1 time buy signal, 3 times sell signal with 
different level .
Friends pls try
Thanks and RegardsAfzal


  

Re: [amibroker] Commands to create a white on black chart: SetChartOptions for Axes/Grid Color

2010-08-04 Thread afzal hossain
Try this if works for you

PlotOHLC(Open, High, Low, Close,    BIdx =  + BarIndex() +    \n + 
O =  + O + \n+H = + H + \n+L  =  + L   + \n+C ,
IIf(CloseOpen, colorBrightGreen,colorRed), styleCandle); 

RegardsAfzal
--- On Tue, 8/3/10, william.schram williamsch...@gmail.com wrote:

From: william.schram williamsch...@gmail.com
Subject: [amibroker] Commands to create a white on black chart: SetChartOptions 
for Axes/Grid Color
To: amibroker@yahoogroups.com
Date: Tuesday, August 3, 2010, 12:50 AM















 
 



  



  
  
  I found code on the knowledge base for a chart that normally has a 
colored background (because the plots are white). I want to know if there are 
commands like: SetChartOptions( 2, chartShowDates ); for setting the color of 
the Grid and Axes of a chart, without altering my default white background with 
black text?



I am aware that the work around would be alter the code from the knowledge 
base, but I'd rather learn something about editing the chart environment.



Below is the code I use presently to setup the chart formatting:



//

// Chart Formatting

//

GraphXSpace = 5; // Adds % extra space above and below the graph line.

SetChartBkColor( colorBlack );

SetChartOptions( 2, chartShowDates );

SetChartOptions( 2, chartLogarithmic );

//SetChartAxes(colorWhite); // Don't know how to do this!!!

//GridColor = ParamColor( GridColor, colorLightGrey );

//SetChartGrid(GridColor); // Don't know how to do this!!!



Are the comparable functions to set the Chart Axes and/or grid color?



Any help would be appreciated,

-WILLIAM






 





 



  











  

[amibroker] Percentage calculation Amibroker

2010-08-04 Thread afzal hossain
Hello All


 



  









Can anybody tell me how can i see in the amibroker % (percentage) change in 
price and volume for last 3 days, last 7 days , last 15 days, last 21days and 
last 3 month. % can be positive or negative. Can anybody help me to give such 
afl?
Thanks and RegardsAfzal


  

[amibroker] Automatic analysis Scan code for bullish stocks

2010-08-04 Thread afzal hossain
Hello


 



  









What could be the automatic analysis scan code for last 3 days bullish stock?
Thanks in advanceAfzal