My visual effect afl collection.

yasu222

Active Member
#93
Dynamic_ORB_Lines

PHP:
_SECTION_BEGIN("Dynamic_ORB_Lines");
dojidiv =5;
CloseEqualOpen  = ( High - Low ) / dojidiv > abs( Open - Close );
RefC = Ref( C, -1 );
RefO = Ref( O, -1 ); 
Up = C > O;
Down = C < O ;
UpDoji = CloseEqualOpen AND RefC > RefO;
DownDoji = CloseEqualOpen AND RefC < RefO;
colcond = IIf( up || updoji, colorBrightGreen, colorRed );
SetBarFillColor( colcond );
Plot( C, "Price", colcond, styleCandle );
 P11   = Param("Start Time",091500, 0 , 235959, 1 ) ; 
 P12   = Param("END Time",103000, 0 , 235959, 1 ) ;
 START = (TimeNum()>= P11);
 END   = (TimeNum()<= P12);
 ZONE  = START AND END;
 ST    = (TimeNum()>= P12);
 NewTime = ZONE!= Ref(ZONE, -1);
 highestoftheday = HighestSince(NewTime,H,1);
 Lowestoftheday  = LowestSince(NewTime,L,1);
 ORBHigh   = ValueWhen(ZONE,highestoftheday,1);
 ORBLow    = ValueWhen(ZONE,lowestoftheday,1);
 ORBClose  = ValueWhen(zone,C,1);

ppl = ParamToggle("ORB_LEVELS","Off|On",0);
if(ppl==1) {
 Plot(ORBHigh,"",colorRed,styleLine);
 Plot(ORBLow,"",colorBrightGreen,styleLine);
 Plot(ORBClose, "",colorPink,styleLine+styleNoRescale);
}
_SECTION_END();
 

yasu222

Active Member
#94
Avoid multiple signals in metastock

NOTE:- You can avoid multiple signals in metastock in the following way:

PHP:
(in case of buy signal)
a:= "Enter the condition for buy" ;
b:= "Enter the condition for sell" ;
state:=If(BarsSince(a)<BarsSince(b),1,0);
state>Ref(state,-1);

(in case of sell signal)
a:= "Enter the condition for buy" ;
b:= "Enter the condition for sell" ;
state:=If(BarsSince(a)>BarsSince(b),1,0);
state>Ref(State,-1);
 

yasu222

Active Member
#95
My_S&R signals

PHP:
_SECTION_BEGIN("!!!MY_S&R");
//PREPARED BY YASU222//
dojidiv =5;
CloseEqualOpen  = ( High - Low ) / dojidiv > abs( Open - Close );
RefC = Ref( C, -1 );
RefO = Ref( O, -1 ); 
Up = C > O;
Down = C < O ;
UpDoji = CloseEqualOpen AND RefC > RefO;
DownDoji = CloseEqualOpen AND RefC < RefO;
colcond = IIf( up || updoji, colorBrightGreen, colorRed );
SetBarFillColor( colcond );
Plot( C, "Price", colcond, styleCandle );
A = Param("Average Periods",5,1,10,1);
N = Param("Short Periods",15,1,500,1);
Average = (Low+High+(2*Close))/4;
OP      = EMA(Average,A);
B1      = HHV(OP,N);
S1      = LLV(OP,N);
avd=IIf(C>Ref(B1,-1),1,IIf(C<Ref(S1,-1),-1,0));
avn=ValueWhen(avd!=0,avd,1);
tsl=IIf(avn==1,S1,B1);
// line code
Plot(tsl, _DEFAULT_NAME(), colorTan, styleStaircase);
Buy1  = Cross(L,TSL) ;
Sell1 = Cross(TSL,H);
Buy   = ExRem(Buy1,Sell1);
Sell  = ExRem(Sell1,Buy1);
Short=Sell;
Cover=Buy;
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-40);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-50);                      
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-45); 
PlotShapes(IIf(Short, shapeSquare, shapeNone),colorRed, 0, H, Offset=40);
PlotShapes(IIf(Short, shapeSquare, shapeNone),colorOrange, 0,H, Offset=50);                      
PlotShapes(IIf(Short, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-45);
AlertIf( Buy, "SOUND C:\\Windows\\Media\\Ding.chimes", "Audio alert", 2 );
AlertIf( Sell, "SOUND C:\\Windows\\Media\\Ding.wav", "Audio alert", 2 );
_SECTION_END();
 

yasu222

Active Member
#96
!9S&R - Metastock Indicator

PHP:
a := Input("Average Pds", 1, 20, 5 );
n := Input("Short Pds", 1, 200, 15 );
average :=(LOW+HIGH+2*CLOSE)/4; 
OP := Mov(average,a,E);
HLd:=If(Cross(C,LLV(OP,n)),
{then}1,
{else}If(Cross(HHV(OP,n),C),
{then}-1,
{else}0));
HLv:=ValueWhen(1,HLd<>0,HLd);
HiLo:=If(HLv=-1,
{then}LLV(OP,n),
{else}HHV(OP,n));
HiLo;
 
Last edited:
#97
Re: Tiger candle

Hi VASU,

I need some help from you as per your free afls i am not able to join symphony presto buy sell short and cover signals. only buy,sell is working so if you have some help on this please guide me for this.

Thank you .

Yogesh Aggarwal

[email protected]

9999973096
 

yasu222

Active Member
#98
yasu222_Stoplss indicator

Yasu222_Stoploss _Metastock_Indicator

PHP:
a := Input("Average Pds", 1, 20, 5 );
n := Input("Short Pds", 1, 200, 15 );
average :=(LOW+HIGH+2*CLOSE)/4; 
OP := Mov(average,a,E);
HLd:=If(Cross(C,Ref(HHV(OP,n),-1)),
{then}1,
{else}If(Cross(Ref(LLV(OP,n),-1),C),
{then}-1,
{else}0));
HLv:=ValueWhen(1,HLd<>0,HLd);
HiLo:=If(HLv=-1,
{then}HHV(OP,n),
{else}LLV(OP,n));
HiLo;
 

yasu222

Active Member
#99
Metastock Super trend

Metastock formula for supertrend indicator.

PHP:
Factor:=Input("Factor",1.00,10.00,3.00);
Pd:=Input("ATR Periods",1,100,10);
Up:=MP()+(Factor*ATR(Pd));
Dn:=MP()-(Factor*ATR(Pd));
Td:=If(Cross(C,LLV(Up,13)),1,If(Cross(HHV(Dn,13),C ),-1,PREV));
Dnx:=If(Dn=HighestSince(1,Cross(Td,0),Dn),Dn,PREV) ;
Upx:=If(Up=LowestSince(1,Cross(0,Td),Up),Up,PREV);
ST:=If(Td=1,Dnx,If(Td=-1,Upx,PREV));
ST
 

yasu222

Active Member
Mutual_fund_manager_cagr_system

PHP:
_SECTION_BEGIN("!!!MUTUAL_FUND_SYSTEM"); 
//PREPARED BY YASU222// 
dojidiv =5; 
CloseEqualOpen  = ( High - Low ) / dojidiv > abs( Open - Close ); 
RefC = Ref( C, -1 ); 
RefO = Ref( O, -1 );  
Up = C > O; 
Down = C < O ; 
UpDoji = CloseEqualOpen AND RefC > RefO; 
DownDoji = CloseEqualOpen AND RefC < RefO; 
colcond = IIf( up || updoji, colorBrightGreen, colorRed ); 
SetBarFillColor( colcond ); 
Plot( C, "Price", colcond, styleCandle ); 
A = Param("Average Periods",5,1,10,1); 
N = Param("Short Periods",15,1,500,1); 
Average = (Low+High+(2*Close))/4; 
OP      = EMA(Average,A); 
B1      = HHV(OP,N); 
S1      = LLV(OP,N); 
avd=IIf(C>Ref(B1,-1),1,IIf(C<Ref(S1,-1),-1,0)); 
avn=ValueWhen(avd!=0,avd,1); 
tsl=IIf(avn==1,S1,B1); 
// line code 
Plot(tsl, _DEFAULT_NAME(), colorTan, styleStaircase); 
EQUITY_BUY_TIME  = Cross(L,TSL) ; 
EQUITY_HOLD_TIME = Cross(TSL,H); 
Buy   = ExRem(EQUITY_BUY_TIME,EQUITY_HOLD_TIME); 
Sell  = ExRem(EQUITY_HOLD_TIME,EQUITY_BUY_TIME); 
Short=Sell; 
Cover=Buy; 
PlotShapes( IIf( Buy, shapeUpArrow, shapeNone ), colorGreen, layer = 0, yposition = L, offset = -15  ); 
PlotShapes( IIf( Sell, shapeSmallCircle, shapeNone ), colorRed, layer = 0, yposition = H, offset = -15  );
_SECTION_END();
 

Similar threads