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

Re: [amibroker] HELP !!! problem with multiple time frames...



PureBytes Links

Trading Reference Links


No one can help me ?



Evo1 a écrit :

Please, help me

Many thanks




Evo1 a écrit :

Hi cstrader,

I would like to display on a daily chart (i.e. green triangles) the weekly bands squeeze (green candle). In the screenshot below, the bands squeeze lasts 1 week (only 1 green candle on the weekly chart) but on the daily chart it spans 3 weeks (9 green triangles) !!!
I guess I was mistaken in my code... :-[

My code is as follows :
=================================================================================
// Bands squeeze : candles are painted in green (no matter the time frame)
Va1 = ((BBandTop(Avg,20,2)-BBandBot(Avg,20,2))/MA(Avg,20))*100;
Cldyn = IIf(Va1<=Ref(LLV(Va1,120),-1), ParamColor("Color V",colorBrightGreen), ParamColor("Color N",colorBlack));

// It displays green triangles (i.e. plotshapes) on a daily chart when there are green candles on a weekly chart
TimeFrameSet( inWeekly );
Va2 = ((BBandTop(Avg,20,2)-BBandBot(Avg,20,2))/MA(Avg,20))*100;
Va3 = Va2<=Ref(LLV(Va2,120),-1);
TimeFrameRestore();

Graph0 = L;
PlotShapes( TimeFrameExpand( va3, inWeekly ) * shapeSmallCircle , colorGreen , 0, Graph0 , -10);
Plot( C, "Close", Cldyn , styleNoTitle | ParamStyle("Style") | GetPriceStyle() );

====================================================================


Thanks for your help !!!
Evo1




cstrader a écrit :
I guess I'm missing the problem.  Isn't "val" meeting the requirement for printing green on 9 consecutive days?
 
 
----- Original Message -----
From: Evo1
Sent: Sunday, December 25, 2005 12:51 PM
Subject: Re: [amibroker] HELP !!! problem with multiple time frames...


No one ? :-[




Evo1 a écrit :

Hi all,

Here is a screenshot of my problem.
I would like to display on a daily chart (plotshapes) the weekly bands squeeze. Unfortunately, AFL adds 4 redundant triangles (1 error for the "Week -1", 3 errors for the "Week + 1") that do not match the green candle on the weekly  chart (bands squeeze = "Week 0").

I suppose my code is wrong but I do not know where...
How can I solve this problem ?

Many thanks for your help,
Regards,
Evo1