![]() |
|
| Discuss AFL required at the AmiBroker within the Traderji.com - Discussion forum for Stocks Commodities & Forex; Can any body provide an AFL for the following metastock expert , found it from ... |
|
|||||||
| Notices |
![]() |
|
|
Thread Tools |
| Sponsored Links |
|
#1
|
|||
|
|||
|
Can any body provide an AFL for the following metastock expert , found it from website of E q u I s based on Trix ( MetaStock Tips & Tricks > 2004 > When and When not to Trade) --
Code:
Gold Cross(GC)= tx:=TRIX(5); sig:=Mov(tx,3,E); Cross(tx,sig) Dead Cross(DC)= tx:=TRIX(5); sig:=Mov(tx,3,E); Cross(sig,tx) Bounce(B)= tx:=TRIX(5); Cross(ROC(tx,1,$),0) Fall(F)= tx:=TRIX(5); Cross(0,ROC(tx,1,$)) |
| Sponsored Links |
|
#2
|
|||
|
|||
|
Here is the exploration :
Code:
tx = Trix(5); sig = EMA(tx,3); gc = Cross(tx,sig); dc = Cross(sig, tx); bounce = Cross(ROC(tx, 1), 0); fall = Cross(0, ROC(tx,1)); percChange = 100*C/Ref(C,-1)-100; Filter = (sig == True) OR (dc == True) OR (bounce == True) OR (fall == True); AddColumn(C, "Close", 8.2); AddColumn(percChange, "% Change", 8.1, IIf(percChange > 0, colorGreen, IIf(perCChange <0, colorRed,colorDefault))); AddColumn(gc, "Gold Cross", 1.0, colorDefault, IIf( gc==True, colorGreen, colorDefault)); AddColumn(dc, "Dead Cross", 1.0, colorDefault, IIf( dc==True, colorRed, colorDefault)); AddColumn(bounce, "Bounce", 1.0, colorDefault, IIf( bounce==True, colorSeaGreen, colorDefault)); AddColumn(fall, "Fall", 1.0, colorDefault, IIf( fall==True, colorOrange, colorDefault)); |
|
#3
|
|||
|
|||
|
And here is the indicator :
Color Legend : Gold Cross - Blue Up Triangle Dead Cross - Red Down Triangle Bounce - Light Green Up Triangle Fall - Orange Down Triangle Code:
tx = Trix(5); sig = EMA(tx,3); gc = Cross(tx,sig); dc = Cross(sig, tx); bounce = Cross(ROC(tx, 1), 0); fall = Cross(0, ROC(tx,1)); PlotShapes(IIf(gc==True, shapeSmallUpTriangle, shapeNone), IIf(gc==True, colorBlue, colorDefault), 0, Low, -20); PlotShapes(IIf(dC==True, shapeSmallDownTriangle, shapeNone), IIf(dC==True, colorRed, colorDefault), 0, High, -20); PlotShapes(IIf(bounce==True, shapeSmallUpTriangle, shapeNone), IIf(bounce==True, colorSeaGreen, colorDefault), 0, Low, -40); PlotShapes(IIf(fall==True, shapeSmallDownTriangle, shapeNone), IIf(fall==True, colorOrange, colorDefault), 0, High, -40); |
| The Following User Says Thank You to Adheer For This Useful Post: | ||
HBBHVN (13th October 2008) | ||
|
#4
|
|||
|
|||
|
Thanks lot
|
|
#5
|
|||
|
|||
|
HTML Code:
tx = Trix(5); sig = EMA(tx,3); gc = Cross(tx,sig); dc = Cross(sig, tx); bounce = Cross(ROC(tx, 1), 0); fall = Cross(0, ROC(tx,1)); PlotShapes(IIf(gc==True, shapeSmallUpTriangle, shapeNone), IIf(gc==True, colorBlue, colorDefault), 0, Low, -20); PlotShapes(IIf(dC==True, shapeSmallDownTriangle, shapeNone), IIf(dC==True, colorRed, colorDefault), 0, High, -20); PlotShapes(IIf(bounce==True, shapeSmallUpTriangle, shapeNone), IIf(bounce==True, colorSeaGreen, colorDefault), 0, Low, -40); PlotShapes(IIf(fall==True, shapeSmallDownTriangle, shapeNone), IIf(fall==True, colorOrange, colorDefault), 0, High, -40); Requesting to recheck the above AFL of Code:
bounce=tx:=TRIX(5); Cross(ROC(tx,1,$),0) Code:
fall=tx:=TRIX(5); Cross(0,ROC(tx,1,$)) Effect of $ is also not found in above AFL. I do not know anything about language/ programming. |
|
#6
|
|||
|
|||
|
can any body provide AFL for RSI n EMA crosover i mean it should show buy arrow when rsi is abv ema n sell arrow when ema is below rsi.
thanks in advance |
|
#7
|
|||
|
|||
|
Hello, reenu10:
I am not an expert, but I created this afl. I put this afl together with the EMA crossing the RSI. Note: In the parameter window you can adjust the RSI setting and the moving average. After you put this indicator on your chart, you will have to left-click on your indicator pane and select "Parameters." There, you can select the settings for your RSI (the default is 15), and then you will need to choose "RSI" in the "Fields" section of the moving average so the moving average will be on the RSI. You can also select the colors of your moving average as well as the type of moving average. There are also green arrows for buy and red for sell. I am sure someone can make this better, but for now I hope this helps. brevco SetChartOptions(0,0,chartGrid30|chartGrid70); periods = Param( "Periods", 15, 1, 200, 1 ); Plot( RSI( periods), "RSI", ParamColor( "RSI Color", colorBlack ), ParamStyle("Style", styleThick) ); Plot(70,"",colorBlack,styleLine|styleNoLabel);//OS Plot(30,"",colorDarkGrey,styleLine | styleNoLabel);//OB Plot(50,"",colorYellow,styleDashed|styleNoLabel);//50 line _SECTION_BEGIN("Weighted MA Color"); SetChartBkColor( ColorHSB( 86, 36, 126 ) ); P = ParamField("Field"); Type = ParamList("Type", "Weighted,Lagless-21,Hull-26,Linear Regression-45,Exponential,Double Exponential,Tripple Exponential,Wilders,Simple"); Periods = Param("Periods", 9, 2, 100 ); Displacement = Param("Displacement", 1, -50, 50 ); m = 0; if( Type == "Weighted" ) m= WMA( P, Periods ); if( Type == "Lagless-21" ) m= 2*EMA(P, Periods)-EMA(EMA(P, Periods), Periods); if( Type == "Hull-26" ) m= WMA(2*(WMA(P, Periods/2))-WMA(P, Periods) ,4 ); if( Type == "Linear Regression-45" ) m= LinearReg( P, Periods ); if( Type == "Exponential" ) m = EMA( P, Periods ); if( Type == "Double Exponential" ) m = DEMA( P, Periods ); if( Type == "Tripple Exponential" ) m = TEMA( P, Periods ); if( Type == "Wilders" ) m = Wilders( P, Periods ); if( Type == "Simple" ) m = MA( P, Periods ); Linecolor = IIf( m > Ref( m, -1), ParamColor("UPColor", colorWhite), ParamColor("DOWNColor", colorBlack) ); Plot( m, _DEFAULT_NAME(),Linecolor , styleThick, 0, 0, Displacement ); _SECTION_END(); Buy = RSI ()> m; Sell = RSI ()< m; Buy = ExRem(Buy, Sell); Sell = ExRem(Sell, Buy); PlotShapes(IIf(Buy,shapeUpArrow,0) ,colorBrightGreen ); PlotShapes(IIf(Sell,shapeDownArrow,0) ,colorRed); AlertIf(Buy,"SOUND C:\\Windows\\Media\\tada.wav","Long "); AlertIf(Sell,"sound C:\\Windows\\media\\tada.wav","sell"); |
|
#8
|
|||
|
|||
|
thanks brecov for the efforts you put in ,but it is showing an error it says
variable`m' being used without having being initialized......so kindly look into it. Regards |
|
#9
|
|||
|
|||
|
thanks a million..............i solved the problem and its working fine now.
|
|
#10
|
|||
|
|||
|
You are very welcome.
brevco |
| Sponsored Links |
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Indemnity, Disclaimer & Disclosure
Notice:
• By visiting Traderji.com you indicate your acceptance of our Forum
Rules Disclaimer & Disclosure and indemnify Traderji.com, its
associates and related parties of all claims howsoever resulting from
the usage of the forum.
• Disclaimer: Trading or investing in stocks & commodities
is a high risk activity. Any action you choose to take in the markets
is totally your own responsibility. Traderji.com will not be liable for
any, direct or indirect, consequential or incidental damages or loss arising out of the use of this information.
• Disclosure: The information in this forum is neither an offer to sell nor solicitation to buy any of the securities mentioned herein.
The writers may or may not be trading in the securities mentioned.
• All names or products mentioned are trademarks or registered trademarks of their respective owners.
General Content Disclaimer Notice:
In light of our policy of encouraging candid, open exchanges of views and the rapid distribution of information originating from many sources, Traderji.com cannot determine the accuracy of information that may be uploaded to the forum. Opinions, advice and all other information expressed by participants in discussions are those of the author. You rely on such information at your own risk. You are urged to seek professional advice for specific, individual situations and not rely solely on advice or opinions given in the discussions. Since Traderji.com is an open and free discussion forum, any comments made by members of this forum in their posts reflect their own views and not of the owner or administrator of Traderji.com. Thus the owner/administrator indemnify themselves of all claims whatsoever and will not be liable or responsible for any members comments/views in this forum Traderji.com. If you find any objectionable or offensive posts made by members of this forum which you would like to bring to our notice for removal then please Contact Us.