PureBytes Links
Trading Reference Links
|
Hi all,
Can't get the writeif to give commentary when nested in an if statement. Any help/ideas appreciated.
See below, and thanks in advance.
Regards,
Gary
//CHART TYPE CALCS
LINECHART = IIf((C == O) AND (C == H) AND (C == L) AND V == 0,1,0);
LASTLINECHART = LastValue(LINECHART);
//=================================== CANDLE OR LINE CHART ========================================
if (LASTLINECHART == 1)
{
PlotForeign(Name(),Name(),colorDefault,styleLine|styleThick|styleDots);
}
if (LASTLINECHART == 0)
{
PlotForeign(Name(),Name(),colorDefault,styleCandle|styleThick);
}
//CODE BELOW FOR BAR CHARTS ONLY
if (LASTLINECHART == 0)
{
//===================================== VOLUME AT PRICE ==========================================
PlotVAPOverlay( 300, 5, colorBrightGreen, 4 );
//================================= FADE, FAKE, GREEN, SQUAT =====================================
RANGE = H-L;
WMFI = (RANGE / V) * 100;
//GREEN
GREEN = V > (Ref(V,-1) * 1.10) AND WMFI > Ref(WMFI,-1);
PlotShapes(IIf(GREEN == 1,shapeHollowSmallCircle,shapeNone), colorBrightGreen, 0, H,5);
//SQUAT
SQUAT = V > (Ref(V,-1) * 1.10) AND WMFI < Ref(WMFI,-1);
PlotShapes(IIf(SQUAT == 1,shapeHollowSmallCircle,shapeNone), colorYellow, 0, H,5);
//FAKE
FAKE = V < (Ref(V,-1) * 1.10) AND WMFI > Ref(WMFI,-1);
PlotShapes(IIf(FAKE == 1,shapeHollowSmallCircle,shapeNone), colorBlack, 0, H,5);
//FADE
FADE = V < (Ref(V,-1) * 1.10) AND WMFI < Ref(WMFI,-1);
PlotShapes(IIf(FADE == 1,shapeHollowSmallCircle,shapeNone), colorWhite, 0, H,5);
//COMMENTARY
WriteIf(GREEN , "\nGREEN =VOL UP & RANGE UP (GREEN)",
WriteIf(SQUAT, "\nYELLOW = VOL UP & RANGE DN (SQUAT)",
WriteIf(FADE, "\nWHITE = VOL DN & RANGE DN (FADE)",
"\nBLACK = VOL DN & RANGE UP (BLACK)")));
}
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
Yahoo! Groups Sponsor
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.
|