Plz senior's help me for find this afl

#12
I want combine two afl.

One afl is candalstick chart with Buy Sell Signal.

Afl is belowe.

_SECTION_BEGIN("Ensign Volatility Stop");

// Ensign Volatility Stop
// get the multiple of 9 period EMA of ATR_Ensign

_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
k=Param("multiplication factor", 1,0.5,5,0.1);

period=k*5;
VS_raw = 2.2 * EMA(ATR(1), period);

// for longs, VS line is below price
loline = VS_below_price = HHV(Close, period) - VS_raw;

// for shorts, VS line is above price
hiline = VS_above_price = LLV(Close, period) + VS_raw;
between = IIf (C < hiline AND C > loline, 1, 0);
up = IIf(C > hiline OR (H > Ref(H, -1) AND H > hiline), 1, 0);
dn = IIf(C < loline OR (L < Ref(L, -1) AND L < loline), 1, 0);
upcond = IIf(between AND BarsSince(up) < BarsSince(dn) , 1, 0);
dncond = IIf(between AND BarsSince(dn) < BarsSince(up) , 1, 0);
upline = IIf(up OR upcond, loline, Null);
dnline = IIf(dn OR dncond, hiline, Null);

Buy=upline;
Sell=dnline;

Col = IIf(Buy,colorGreen,IIf(Sell,colorRed,colorBlack));

Plot(C, "", col, styleBar | styleThick );

Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);

shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorBrightGreen, colorRed ),0, IIf( Buy, Low, High ) );


Second afl is SUPPORT AND RESISTANCE These afl is show All support and Resistance.

The afl is below

//|-----------------------------------------------------------------------------------------
//|PatternExplorer.com - Support & Resistance
//|Copyright 2007, PatternExplorer.com
//|http://www.PatternExplorer.com
//|e-mail: [email protected]
//|-----------------------------------------------------------------------------------------
FormulaName = "PE - S & R";

SetChartOptions( 0, chartShowDates | chartLogarithmic | chartWrapTitle );
#pragma nocache
#include_once <\PEInc\PatternExplorer_f0.afl>
#include_once "Formulas\PatternExplorer\#Defaults & Mods\PE - Defaults.afl"
#include_once "Formulas\PatternExplorer\#Defaults & Mods\PE - Mods.afl"
/************************************************** *****************************************/
AddCustomCodeBeforePE();
/************************************************** *****************************************/

_SECTION_BEGIN( "Main Parameters" );
AddparamUsefromChart( def_UseFromChart );
Sensitivity = Param( "Sensitivity", 10, 0, 100, 1 );

if ( InChart )
StaticVarSet( "FYIOKU", Sensitivity );

if ( inAA AND Usefromchart )
Sensitivity = StaticVarGet( "FYIOKU" );

DisRange = Param( "Plot 'far away' Lines Trigger", 3, 0, 10, 0.5 );

Color_SL = ParamColor( "Support", def_Color1 );

Color_RL = ParamColor( "Resistance", colorRed );

_SECTION_END();

/************************************************** *****************************************/
#include_once <\PEInc\PatternExplorer_1.afl>
#include_once <\PEInc\Lib\PatternExplorer_f15.afl>
/************************************************** *****************************************/
BS = break_G1_val == 1 OR break_G2_val == 1;

SS = break_G1_val == -1 OR break_G2_val == -1;

Buy = def_Buy AND BS;

Sell = SS;

/************************************************** *****************************************/
Filter = def_Filter AND BarIndex() == LastValue( BarIndex() ) AND NOT GroupID() == 253;

Filter = Filter AND ( Buy OR Sell );

/************************************************** *****************************************/
Addefaultcolumns();

Adddefaultcolumns( 2, 1 );

AddTextColumn(
WriteIf( break_G1_val == -1, "Break",
WriteIf( break_G1_val == 1, "Break", "" ) ), "Minor Levels", 1.2,
IIf( break_G1_val == 1, colorGreen, IIf( break_G1_val == -1, colorRed, colorBlue ) ) );

AddTextColumn(
WriteIf( break_G2_val == -1, "Break",
WriteIf( break_G2_val == 1, "Break", "" ) ), "Major Levels", 1.2,
IIf( break_G2_val == 1, colorGreen, IIf( break_G2_val == -1, colorRed, colorBlue ) ) );

AddTextColumn( FullName(), "Full name" );

/************************************************** *****************************************/
Plot( IIf( x >= XT1 & RT1 &NOT T1 == 0, T1, -1e10 ), "T1", IIf( LastValue( C ) < T1, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XT2 & RT2 &NOT T2 == 0, T2, -1e10 ), "T2", IIf( LastValue( C ) < T2, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XT3 & RT3 &NOT T3 == 0, T3, -1e10 ), "T3", IIf( LastValue( C ) < T3, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XT4 & RT4 &NOT T4 == 0, T4, -1e10 ), "T4", IIf( LastValue( C ) < T4, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XT5 & RT5 &NOT T5 == 0, T5, -1e10 ), "T5", IIf( LastValue( C ) < T5, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XP1 & RP1 &NOT P1 == 0, P1, -1e10 ), "P1", IIf( LastValue( C ) < P1, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XP2 & RP2 &NOT P2 == 0, P2, -1e10 ), "P2", IIf( LastValue( C ) < P2, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XP3 & RP3 &NOT P3 == 0, P3, -1e10 ), "P3", IIf( LastValue( C ) < P3, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XP4 & RP4 &NOT P4 == 0, P4, -1e10 ), "P4", IIf( LastValue( C ) < P4, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XP5 & RP5 &NOT P5 == 0, P5, -1e10 ), "P5", IIf( LastValue( C ) < P5, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XT6 & RT6 &NOT T6 == 0, T6, -1e10 ), "T6", IIf( LastValue( C ) < T6, Color_RL, Color_SL ), 8 + 2048 + styleNoTitle );

Plot( IIf( x >= XT7 & RT7 &NOT T7 == 0, T7, -1e10 ), "T7", IIf( LastValue( C ) < T7, Color_RL, Color_SL ), 8 + 2048 + styleNoTitle );

Plot( IIf( x >= XP6 & RP6 &NOT P6 == 0, P6, -1e10 ), "P6", IIf( LastValue( C ) < P6, Color_RL, Color_SL ), 8 + 2048 + styleNoTitle );

Plot( IIf( x >= XP7 & RP7 &NOT P7 == 0, P7, -1e10 ), "P7", IIf( LastValue( C ) < P7, Color_RL, Color_SL ), 8 + 2048 + styleNoTitle );

/************************************************** *****************************************/
ToolTip = def_ToolTip;

/************************************************** *****************************************/
AddCustomCodeAfterPE();

/************************************************** *****************************************/
Title = "PatternExplorer.com - Support & Resistance" + default_priceTitle + EncodeColor( IIf( NOT AnZ, def_Text2, colorRed ) ) + ",Sensitivity = " + WriteVal( Sensitivity, 1 ) + " " + EncodeColor( colorRed ) + WriteIf( NOT AnZ, "", " NO POINTS AVAILABLE -> REDUCE SENSITIVITY " );


Any one can combine these two afl.
If price is 5200 on bar chart.
Support is 5100 and resitance is 5400.
i want support resistance price on bar chart.
Support means stop loss and resitance means target.
Means current nifty trade 5200 stop loss is 5100 and target is 5400.
these information is show on bar chart without support and resitance chart.

If any one can do these pls try.

Thanks
 
#13
pls try this I am unable to upload file i dont know why???

_SECTION_BEGIN("Ensign Volatility Stop");

// Ensign Volatility Stop
// get the multiple of 9 period EMA of ATR_Ensign

_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
k=Param("multiplication factor", 1,0.5,5,0.1);

period=k*5;
VS_raw = 2.2 * EMA(ATR(1), period);

// for longs, VS line is below price
loline = VS_below_price = HHV(Close, period) - VS_raw;

// for shorts, VS line is above price
hiline = VS_above_price = LLV(Close, period) + VS_raw;
between = IIf (C < hiline AND C > loline, 1, 0);
up = IIf(C > hiline OR (H > Ref(H, -1) AND H > hiline), 1, 0);
dn = IIf(C < loline OR (L < Ref(L, -1) AND L < loline), 1, 0);
upcond = IIf(between AND BarsSince(up) < BarsSince(dn) , 1, 0);
dncond = IIf(between AND BarsSince(dn) < BarsSince(up) , 1, 0);
upline = IIf(up OR upcond, loline, Null);
dnline = IIf(dn OR dncond, hiline, Null);

Buy=upline;
Sell=dnline;

Col = IIf(Buy,colorGreen,IIf(Sell,colorRed,colorBlack));

Plot(C, "", col, styleBar | styleThick );

Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);

shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorBrightGreen, colorRed ),0, IIf( Buy, Low, High ) );

//|-----------------------------------------------------------------------------------------
//|PatternExplorer.com - Support & Resistance
//|Copyright 2007, PatternExplorer.com
//|http://www.PatternExplorer.com
//|e-mail: [email protected]
//|-----------------------------------------------------------------------------------------
FormulaName = "PE - S & R";

SetChartOptions( 0, chartShowDates | chartLogarithmic | chartWrapTitle );
#pragma nocache
#include_once <\PEInc\PatternExplorer_f0.afl>
#include_once "Formulas\PatternExplorer\#Defaults & Mods\PE - Defaults.afl"
#include_once "Formulas\PatternExplorer\#Defaults & Mods\PE - Mods.afl"
/************************************************** *****************************************/
AddCustomCodeBeforePE();
/************************************************** *****************************************/

_SECTION_BEGIN( "Main Parameters" );
AddparamUsefromChart( def_UseFromChart );
Sensitivity = Param( "Sensitivity", 10, 0, 100, 1 );

if ( InChart )
StaticVarSet( "FYIOKU", Sensitivity );

if ( inAA AND Usefromchart )
Sensitivity = StaticVarGet( "FYIOKU" );

DisRange = Param( "Plot 'far away' Lines Trigger", 3, 0, 10, 0.5 );

Color_SL = ParamColor( "Support", def_Color1 );

Color_RL = ParamColor( "Resistance", colorRed );

_SECTION_END();

/************************************************** *****************************************/
#include_once <\PEInc\PatternExplorer_1.afl>
#include_once <\PEInc\Lib\PatternExplorer_f15.afl>
/************************************************** *****************************************/
BS = break_G1_val == 1 OR break_G2_val == 1;

SS = break_G1_val == -1 OR break_G2_val == -1;

Buy = def_Buy AND BS;

Sell = SS;

/************************************************** *****************************************/
Filter = def_Filter AND BarIndex() == LastValue( BarIndex() ) AND NOT GroupID() == 253;

Filter = Filter AND ( Buy OR Sell );

/************************************************** *****************************************/
Addefaultcolumns();

Adddefaultcolumns( 2, 1 );

AddTextColumn(
WriteIf( break_G1_val == -1, "Break",
WriteIf( break_G1_val == 1, "Break", "" ) ), "Minor Levels", 1.2,
IIf( break_G1_val == 1, colorGreen, IIf( break_G1_val == -1, colorRed, colorBlue ) ) );

AddTextColumn(
WriteIf( break_G2_val == -1, "Break",
WriteIf( break_G2_val == 1, "Break", "" ) ), "Major Levels", 1.2,
IIf( break_G2_val == 1, colorGreen, IIf( break_G2_val == -1, colorRed, colorBlue ) ) );

AddTextColumn( FullName(), "Full name" );

/************************************************** *****************************************/
Plot( IIf( x >= XT1 & RT1 &NOT T1 == 0, T1, -1e10 ), "T1", IIf( LastValue( C ) < T1, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XT2 & RT2 &NOT T2 == 0, T2, -1e10 ), "T2", IIf( LastValue( C ) < T2, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XT3 & RT3 &NOT T3 == 0, T3, -1e10 ), "T3", IIf( LastValue( C ) < T3, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XT4 & RT4 &NOT T4 == 0, T4, -1e10 ), "T4", IIf( LastValue( C ) < T4, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XT5 & RT5 &NOT T5 == 0, T5, -1e10 ), "T5", IIf( LastValue( C ) < T5, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XP1 & RP1 &NOT P1 == 0, P1, -1e10 ), "P1", IIf( LastValue( C ) < P1, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XP2 & RP2 &NOT P2 == 0, P2, -1e10 ), "P2", IIf( LastValue( C ) < P2, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XP3 & RP3 &NOT P3 == 0, P3, -1e10 ), "P3", IIf( LastValue( C ) < P3, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XP4 & RP4 &NOT P4 == 0, P4, -1e10 ), "P4", IIf( LastValue( C ) < P4, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XP5 & RP5 &NOT P5 == 0, P5, -1e10 ), "P5", IIf( LastValue( C ) < P5, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XT6 & RT6 &NOT T6 == 0, T6, -1e10 ), "T6", IIf( LastValue( C ) < T6, Color_RL, Color_SL ), 8 + 2048 + styleNoTitle );

Plot( IIf( x >= XT7 & RT7 &NOT T7 == 0, T7, -1e10 ), "T7", IIf( LastValue( C ) < T7, Color_RL, Color_SL ), 8 + 2048 + styleNoTitle );

Plot( IIf( x >= XP6 & RP6 &NOT P6 == 0, P6, -1e10 ), "P6", IIf( LastValue( C ) < P6, Color_RL, Color_SL ), 8 + 2048 + styleNoTitle );

Plot( IIf( x >= XP7 & RP7 &NOT P7 == 0, P7, -1e10 ), "P7", IIf( LastValue( C ) < P7, Color_RL, Color_SL ), 8 + 2048 + styleNoTitle );

/************************************************** *****************************************/
ToolTip = def_ToolTip;

/************************************************** *****************************************/
AddCustomCodeAfterPE();

/************************************************** *****************************************/
Title = "PatternExplorer.com - Support & Resistance" + default_priceTitle + EncodeColor( IIf( NOT AnZ, def_Text2, colorRed ) ) + ",Sensitivity = " + WriteVal( Sensitivity, 1 ) + " " + EncodeColor( colorRed ) + WriteIf( NOT AnZ, "", " NO POINTS AVAILABLE -> REDUCE SENSITIVITY " );
 
Last edited:
#14
where to get these include afl?

pls try this I am unable to upload file i dont know why???

_SECTION_BEGIN("Ensign Volatility Stop");

// Ensign Volatility Stop
// get the multiple of 9 period EMA of ATR_Ensign

_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
k=Param("multiplication factor", 1,0.5,5,0.1);

period=k*5;
VS_raw = 2.2 * EMA(ATR(1), period);

// for longs, VS line is below price
loline = VS_below_price = HHV(Close, period) - VS_raw;

// for shorts, VS line is above price
hiline = VS_above_price = LLV(Close, period) + VS_raw;
between = IIf (C < hiline AND C > loline, 1, 0);
up = IIf(C > hiline OR (H > Ref(H, -1) AND H > hiline), 1, 0);
dn = IIf(C < loline OR (L < Ref(L, -1) AND L < loline), 1, 0);
upcond = IIf(between AND BarsSince(up) < BarsSince(dn) , 1, 0);
dncond = IIf(between AND BarsSince(dn) < BarsSince(up) , 1, 0);
upline = IIf(up OR upcond, loline, Null);
dnline = IIf(dn OR dncond, hiline, Null);

Buy=upline;
Sell=dnline;

Col = IIf(Buy,colorGreen,IIf(Sell,colorRed,colorBlack));

Plot(C, "", col, styleBar | styleThick );

Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);

shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorBrightGreen, colorRed ),0, IIf( Buy, Low, High ) );

//|-----------------------------------------------------------------------------------------
//|PatternExplorer.com - Support & Resistance
//|Copyright 2007, PatternExplorer.com
//|http://www.PatternExplorer.com
//|e-mail: [email protected]
//|-----------------------------------------------------------------------------------------
FormulaName = "PE - S & R";

SetChartOptions( 0, chartShowDates | chartLogarithmic | chartWrapTitle );
#pragma nocache
#include_once <\PEInc\PatternExplorer_f0.afl>
#include_once "Formulas\PatternExplorer\#Defaults & Mods\PE - Defaults.afl"
#include_once "Formulas\PatternExplorer\#Defaults & Mods\PE - Mods.afl"
/************************************************** *****************************************/
AddCustomCodeBeforePE();
/************************************************** *****************************************/

_SECTION_BEGIN( "Main Parameters" );
AddparamUsefromChart( def_UseFromChart );
Sensitivity = Param( "Sensitivity", 10, 0, 100, 1 );

if ( InChart )
StaticVarSet( "FYIOKU", Sensitivity );

if ( inAA AND Usefromchart )
Sensitivity = StaticVarGet( "FYIOKU" );

DisRange = Param( "Plot 'far away' Lines Trigger", 3, 0, 10, 0.5 );

Color_SL = ParamColor( "Support", def_Color1 );

Color_RL = ParamColor( "Resistance", colorRed );

_SECTION_END();

/************************************************** *****************************************/
#include_once <\PEInc\PatternExplorer_1.afl>
#include_once <\PEInc\Lib\PatternExplorer_f15.afl>
/************************************************** *****************************************/
BS = break_G1_val == 1 OR break_G2_val == 1;

SS = break_G1_val == -1 OR break_G2_val == -1;

Buy = def_Buy AND BS;

Sell = SS;

/************************************************** *****************************************/
Filter = def_Filter AND BarIndex() == LastValue( BarIndex() ) AND NOT GroupID() == 253;

Filter = Filter AND ( Buy OR Sell );

/************************************************** *****************************************/
Addefaultcolumns();

Adddefaultcolumns( 2, 1 );

AddTextColumn(
WriteIf( break_G1_val == -1, "Break",
WriteIf( break_G1_val == 1, "Break", "" ) ), "Minor Levels", 1.2,
IIf( break_G1_val == 1, colorGreen, IIf( break_G1_val == -1, colorRed, colorBlue ) ) );

AddTextColumn(
WriteIf( break_G2_val == -1, "Break",
WriteIf( break_G2_val == 1, "Break", "" ) ), "Major Levels", 1.2,
IIf( break_G2_val == 1, colorGreen, IIf( break_G2_val == -1, colorRed, colorBlue ) ) );

AddTextColumn( FullName(), "Full name" );

/************************************************** *****************************************/
Plot( IIf( x >= XT1 & RT1 &NOT T1 == 0, T1, -1e10 ), "T1", IIf( LastValue( C ) < T1, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XT2 & RT2 &NOT T2 == 0, T2, -1e10 ), "T2", IIf( LastValue( C ) < T2, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XT3 & RT3 &NOT T3 == 0, T3, -1e10 ), "T3", IIf( LastValue( C ) < T3, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XT4 & RT4 &NOT T4 == 0, T4, -1e10 ), "T4", IIf( LastValue( C ) < T4, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XT5 & RT5 &NOT T5 == 0, T5, -1e10 ), "T5", IIf( LastValue( C ) < T5, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XP1 & RP1 &NOT P1 == 0, P1, -1e10 ), "P1", IIf( LastValue( C ) < P1, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XP2 & RP2 &NOT P2 == 0, P2, -1e10 ), "P2", IIf( LastValue( C ) < P2, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XP3 & RP3 &NOT P3 == 0, P3, -1e10 ), "P3", IIf( LastValue( C ) < P3, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XP4 & RP4 &NOT P4 == 0, P4, -1e10 ), "P4", IIf( LastValue( C ) < P4, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XP5 & RP5 &NOT P5 == 0, P5, -1e10 ), "P5", IIf( LastValue( C ) < P5, Color_RL, Color_SL ), 1 + 2048 + styleNoTitle );

Plot( IIf( x >= XT6 & RT6 &NOT T6 == 0, T6, -1e10 ), "T6", IIf( LastValue( C ) < T6, Color_RL, Color_SL ), 8 + 2048 + styleNoTitle );

Plot( IIf( x >= XT7 & RT7 &NOT T7 == 0, T7, -1e10 ), "T7", IIf( LastValue( C ) < T7, Color_RL, Color_SL ), 8 + 2048 + styleNoTitle );

Plot( IIf( x >= XP6 & RP6 &NOT P6 == 0, P6, -1e10 ), "P6", IIf( LastValue( C ) < P6, Color_RL, Color_SL ), 8 + 2048 + styleNoTitle );

Plot( IIf( x >= XP7 & RP7 &NOT P7 == 0, P7, -1e10 ), "P7", IIf( LastValue( C ) < P7, Color_RL, Color_SL ), 8 + 2048 + styleNoTitle );

/************************************************** *****************************************/
ToolTip = def_ToolTip;

/************************************************** *****************************************/
AddCustomCodeAfterPE();

/************************************************** *****************************************/
Title = "PatternExplorer.com - Support & Resistance" + default_priceTitle + EncodeColor( IIf( NOT AnZ, def_Text2, colorRed ) ) + ",Sensitivity = " + WriteVal( Sensitivity, 1 ) + " " + EncodeColor( colorRed ) + WriteIf( NOT AnZ, "", " NO POINTS AVAILABLE -> REDUCE SENSITIVITY " );
 
#17
Plz senior's help me to improve this afl

Remove i can give u than no error
To Jitensingh and all Seniors ...

Hello,
I am following yours msg and post from long time and understood that you all are having good knowledge of afl and coding.

I need your help...I will be very thankful if you can sort it out...

I have one afl (amibroker)...It is giving Buy/sell signal as Up or Down Arrow....I want "Strong Buy @ 0000" or "Strong Sell @ 0000" on chart above and below BUY / SELL Up or Down arrow..( here 0000 is a Current Price on which signal will generate).

Can you modify the code and insert these messages into code and re-post to me ???

Kindly read last six line from the code below...where I have mentioned my requirement.

Thanks in Advance.

Bhupesh



Here is a code.



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, "Close", ParamColor("Color", colorWhite ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
Plot(C,"",colorRose, styleCandle );
if( ParamToggle("Tooltip shows", "All Values|Only Prices" ) )
{
ToolTip=StrFormat("Open: %g\nHigh: %g\nLow: %g\nClose: %g (%.1f%%)\nVolume: "+NumToStr( V, 1 ), O, H, L, C, SelectedValue( ROC( C, 1 )));
}


SL = ( HHV( H, 26 ) + LLV( L, 26) )/2; // standard, base, or kijun-sen line
TL = ( HHV( H, 9 ) + LLV( L, 9 ) )/2; // turning, conversion, or tenkan-sen line
DL = Ref( C, 26 ); // delayed close price, or chikou span
Span1 = Ref( ( SL + TL )/2, -25 ); //Span1 and Span2 define the clouds
Span2 = Ref( (HHV( H, 52) + LLV(L, 52))/2, -25);
/*
SL = ( HHV( H, 26 ) + LLV( L, 26) )/2;
TL = ( HHV( H, 9 ) + LLV( L, 9 ) )/2;
DL = Ref( C, 26 );
Span1 = (( SL + TL )/2);
Span2 = (HHV( H, 52) + LLV(L, 52))/2;
*/
hue = Param("Hue",140,0,255,1);
sat = Param("Sat",100,0,255,1);
bri = Param("bri",220,0,255,1);

Plot(SL,"SL",colorBlue,styleThick); // standard, base, or kijun-sen line
Plot(TL,"TL",colorRed,styleThick); // turning, conversion, or tenkan-sen line
Plot(DL,"DL",colorLime ,styleThick); // delayed, lagging, or chikou span
//Plot(Span1,"",colorGreen,1,0,0,26); // senkou span A, kumo, or white clouds
//Plot(Span2,"",colorSeaGreen,1,0,0,26); // senkou span B, kumo, or white clouds
PlotOHLC(Span1,Span1,Span2,Span2,"Cloud",ColorHSB( Hue,sat,bri),styleCloud);
//PlotOHLC(Span1,Span2,Span1,Span2,"",IIf(Span1>Span 2,8,9),styleCloud|4096,0,0,26);

Buy = Cross(TL,SL);
Sell = Cross(SL,TL);
shape=Buy*shapeUpArrow + Sell*shapeDownArrow;
PlotShapes(shape,IIf(Buy,colorDarkGreen,colorRed), 0,IIf(Buy,Low,High));

above = IIf(TL>Span1 AND TL>Span2,1,0);
within = IIf(TL>Span1 AND TL<Span2,1,0);
below = IIf(TL<Span1 AND TL<Span2,1,0);
Buy = Cross(TL,SL) AND (DL>Close);
Sell = Cross(SL,TL) AND (DL<SL);
StrongBuy = Buy AND above;
MediumBuy = Buy AND within;
WeakBuy = Buy AND below;
StrongSell = Sell AND below;
MediumSell = Sell AND within;
WeakSell = Sell AND above;

IIf( (StrongBuy),PlotShapes(shapeUpTriangle*StrongBuy, colorGreen),0); // I want to show msg Strong Buy @ (price) Here wit Arrow
IIf( (MediumBuy),PlotShapes(shapeUpArrow*MediumBuy,colorGreen),0); // I want to show msg Medium Buy @ (price) Here wit Arrow
IIf( (WeakBuy),PlotShapes(shapeHollowUpArrow*WeakBuy,colorIndigo),0); // I want to show msg Weak Buy @ (price) Here wit Arrow
IIf( (StrongSell),PlotShapes(shapeDownTriangle*StrongSell,colorRed),0);// I want to show msg Strong Sell @ (price) Here wit Arrow
IIf( (MediumSell),PlotShapes(shapeDownArrow*MediumSell, colorRed),0); // I want to show msg Medium Sell @ (price)Here wit Arrow
IIf( (WeakSell),PlotShapes(shapeHollowDownArrow*WeakSel l,colorBrown),0);// I want to show msg Weak Sell @ (price)Here wit Arrow
 

Similar threads