AFL Request: Help Needed

#1
Hello everybody,
I’m happy to meet knowledgeable traderji members on this day
I’m new to trading
Kindly Provide AFL for,
When a candle’s open and close above the Wilders Moving Average (20periods) I need a signal arrow below the candle and also candle's open and close below the Wilders Moving Average need a signal arrow above the candle.
Can someone help please?
Thank U in advance
 
#2
Hi venkatbabu

Here is something in a chart form.

Check it if it is what you wanted.
There may be something not ok.



Many members will come and help you soon.

What is your basis for this concept? read it somewhere or other things?


 
#3
Dear Sir,
Thank you for your quick reply.
The snapshot sent by you is what I expected. I want to use this one with super trend line. I think it will give a good result for 15min. time frame. So please send me the AFL.(snapshot attached)
Thank you.
 
Last edited:

Tamil trader

Well-Known Member
#4
_SECTION_BEGIN("Unnamed 6");

// E.M.Pottasch, Jul 2010
// from Metastock formula, link: http://stocata.org/metastock/stop_trail_atr.html
// added separate parameters for upward and downward market environment

function vstop_func(trBull,trBear)
{
trailArray[ 0 ] = C[ 0 ]; // initialize
for( i = 1; i < BarCount; i++ )
{
prev = trailArray[ i - 1 ];

if (C[ i ] > prev AND C[ i - 1 ] > prev)
{
trailArray[ i ] = Max(prev,C[ i ] - trBull[ i ]);
}
else if (C[ i ] < prev AND C[ i - 1 ] < prev)
{
trailArray[ i ] = Min(prev,C[ i ] + trBear[ i ]);
}
else if (C[ i ] > prev)
{
trailArray[ i ] = C[ i ] - trBull[ i ];
}
else
{
trailArray[ i ] = C[ i ] + trBear[ i ];
}
}
return trailArray;
}

per = Param("per",20, 1, 150, 1);
multBull = Param("multBull",2, 1, 4, 0.05);
multBear = Param("multBear",2, 1, 4, 0.05);

trBull = multBull * ATR(per);
trBear = multBear * ATR(per);

trailArray = vstop_func(trBull,trBear);

SetChartBkColor( ParamColor("ColorBG", ColorRGB( 0, 0, 0 ) ) );
GraphXSpace = 5;
SetChartOptions(0, chartShowDates);
Plot(IIf(trailArray > C,trailArray,Null),"\ntrailShort",ParamColor("Colo rTrailShort",ColorRGB(255,0,0)),styleStaircase);
Plot(IIf(trailArray < C,trailArray,Null),"\ntrailLong",ParamColor("Color TrailLong",ColorRGB(0,255,0)),styleStaircase);
Plot( C, "\nCandle",colorWhite, styleCandle );
_SECTION_END();

_SECTION_BEGIN("Unnamed 8");
//ADD THESE LINES.
//Buysell arrows(IF CHART IS BLACK BACKGROUND)

Buy = Cross(C,trailarray);
Sell = Cross(trailarray,C);
//shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
shape = Buy * shapeUpTriangle + Sell * shapeDownTriangle;

PlotShapes( shape, IIf( Buy, colorBrightGreen, colorYellow ), 0, IIf( Buy, Low, High ) );
_SECTION_END();
 
#5
Hai Ford7k,
Thank you for your quick reply.
The snapshot sent by you is what I expected. I want to use this one with super trend line. I think it will give a good result for 15min. time frame. So please send me the AFL.
Thank you.
 
#6
Thank you Tamil trader for your quick reply.
but i want ford7k's snapshot AFL
(When a candle’s open and close above the Wilders Moving Average (20periods) I need a signal arrow below the candle and also candle's open and close below the Wilders Moving Average need a signal arrow above the candle. )

Thank you.
 

johnnypareek

Well-Known Member
#7
Hello everybody,
I’m happy to meet knowledgeable traderji members on this day
I’m new to trading
Kindly Provide AFL for,
When a candle’s open and close above the Wilders Moving Average (20periods) I need a signal arrow below the candle and also candle's open and close below the Wilders Moving Average need a signal arrow above the candle.
Can someone help please?
Thank U in advance
I guess this will help u.

HTML:
_SECTION_BEGIN("Unnamed 6");

// E.M.Pottasch, Jul 2010
// from Metastock formula, link: http://stocata.org/metastock/stop_trail_atr.html
// added separate parameters for upward and downward market environment

function vstop_func(trBull,trBear)
{
trailArray[ 0 ] = C[ 0 ]; // initialize
for( i = 1; i < BarCount; i++ )
{
prev = trailArray[ i - 1 ];

if (C[ i ] > prev AND C[ i - 1 ] > prev)
{
trailArray[ i ] = Max(prev,C[ i ] - trBull[ i ]);
}
else if (C[ i ] < prev AND C[ i - 1 ] < prev)
{
trailArray[ i ] = Min(prev,C[ i ] + trBear[ i ]);
}
else if (C[ i ] > prev)
{
trailArray[ i ] = C[ i ] - trBull[ i ];
}
else
{
trailArray[ i ] = C[ i ] + trBear[ i ];
}
}
return trailArray;
}

per = Param("per",20, 1, 150, 1);
multBull = Param("multBull",2, 1, 4, 0.05);
multBear = Param("multBear",2, 1, 4, 0.05);

trBull = multBull * ATR(per);
trBear = multBear * ATR(per);

trailArray = vstop_func(trBull,trBear);

SetChartBkColor( ParamColor("ColorBG", ColorRGB( 0, 0, 0 ) ) );
GraphXSpace = 5;
SetChartOptions(0, chartShowDates);
Plot(IIf(trailArray > C,trailArray,Null),"\ntrailShort",ParamColor("Colo rTrailShort",ColorRGB(255,0,0)),styleStaircase);
Plot(IIf(trailArray < C,trailArray,Null),"\ntrailLong",ParamColor("Color TrailLong",ColorRGB(0,255,0)),styleStaircase);
Plot( C, "\nCandle",colorWhite, styleCandle );
_SECTION_END();

_SECTION_BEGIN("Unnamed 8");
//ADD THESE LINES.
//Buysell arrows(IF CHART IS BLACK BACKGROUND)
t=WMA(C,20);
Plot(t,"20TMA",6,1);
Buy = O>t AND C>O;//(C>trailarray);
Sell = O<t AND C<O;//(trailarray>C);
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
//shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
shape = Buy * shapeUpTriangle + Sell * shapeDownTriangle;

PlotShapes( shape, IIf( Buy, colorBrightGreen, colorYellow ), 0, IIf( Buy, Low, High ) );
_SECTION_END();
 

Similar threads

Intraday Higher Leverage

Save up to 90% in brokerage and get higher leverage for intraday trades.

Name:Phone:
Email:City:
State:
Are you a day trader?