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

[amibroker] Re: AFL help - pivots from prior day not stable



PureBytes Links

Trading Reference Links

After another look, it appears the changing numbers are just flashing 
in the interpretation window when I click on a prior day.

However, I'm wondering if is is possible to target a specific time to 
capture the high, low & close for various sessions like europe, asia 
and new york.  Any ideas?


--- In amibroker@xxxxxxxxxxxxxxx, "n7wyw" <dennisljohnston@xxxx> 
wrote:
>
> I got the original code from the libary.  I added an interpretation 
> to see the values for calculations and pivots.
> 
> I used IB data feed from my real account for prices on EUR.USD.  To 
> my surprise the prior day's high low and close changed from momemnt 
> to moment as I watched it. 
> 
> Plus, it seems to use a value different than the midnight close 
like 
> I thought it would.  Any clues?
> 
> 
> /*======================================================
> 		FOREX INTRADAY HEIKIN ASHI + PIVOT POINTS
>   ======================================================*/
> 
> //---- heikin ashi
> HaClose = (O+H+L+C)/4; 
> HaOpen = AMA( Ref( HaClose, -1 ), 0.5 ); 
> HaHigh = Max( H, Max( HaClose, HaOpen ) ); 
> HaLow = Min( L, Min( HaClose, HaOpen ) ); 
> xDiff = (HaHigh - Halow) * IIf(StrFind(Name(),"JPY"),100,10000);
> barcolor = IIf(HaClose >= HaOpen,colorGreen,colorRed);
> PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "", barcolor, 
> styleCandle ); 
> // Plot(EMA(HaClose,9),"",colorWhite, styleLine);
> // Plot(EMA(HaClose,18),"",colorBlack, styleLine);
> 
> //---- pivot points
> DayH = TimeFrameGetPrice("H", inDaily, -1);		// 
> yesterdays high
> DayL = TimeFrameGetPrice("L", inDaily, -1);		//	
> 			low
> DayC = TimeFrameGetPrice("C", inDaily, -1);		//	
> 			close
> DayO = TimeFrameGetPrice("O", inDaily);			// 
current 
> day open
> 
> // woodies FIB pivots
> if ( False )
> {
> R = DayH - DayL;	  // range
> PP = (DayH + DayL + DayO + DayO) / 4 ;
> R1 = PP + (R * 0.38);
> R2 = PP + (R * 0.62);
> S1 = PP - (R * 0.38);
> S2 = PP - (R * 0.62);
> }
> 
> // woodies pivots
> if ( True )
> {
> PP = (DayH + DayL + DayO + DayO) / 4 ;
> R1  =  (2 * PP) - DayL;
> S1  =  (2 * PP) - DayH;
> R2  =  PP + (DayH - DayL);
> S2  =  PP - (DayH - DayL);
> }
> 
> // regular pivots
> if ( False )
> {
> PP = (DayL + DayH + DayC)/3 ;
> R1  =  (2 * PP) - DayL;
> S1  =  (2 * PP)  - DayH;
> R2  =  (PP - S1) + R1;
> S2  =  PP - (R1 - S1);
> }
> 
> Plot(R1, "",colorWhite,styleDots);
> Plot(S1, "",colorDarkBlue,styleDots);
> Plot(R2, "R2",colorWhite,styleDots);
> Plot(S2, "S2",colorDarkBlue,styleDots);
> Plot(PP, "",colorYellow,styleLine);
> //----
> Title = Name()+" Heikin Ashi "+Date();
> 
> "DayH " + WriteVal( DayH,1.4);
> "DayL " + WriteVal( DayL,1.4);
> "DayC " + WriteVal( DayC,1.4);
> "PP " + WriteVal( PP,1.4);
> 
> "R2 " + WriteVal( R2,1.4);
> "R1 " + WriteVal( R1,1.4);
> 
> "S2 " + WriteVal( S2,1.4);
> "S1 " + WriteVal( S1,1.4);
> 
> "P " + WriteVal( C,1.4);
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.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/