![]() |
|
| Discuss coversion from afl to metatrader at the MetaTrader within the Traderji.com - Discussion forum for Stocks Commodities & Forex; can anyone change this afl to meta trader format thanx in advance prev=AMA2(C,1,0); d=IIf(C>Ref(Max(Max(H,Ref(H,-20)),Max(Ref(H,-10),Ref(H,-15))),-1),Min(Min(L,Ref(L,-20)),Min(Ref(L,-10),Ref(L,-15))), IIf(C<Ref(Min(Min(L,Ref(L,-20)),Min(Ref(L,-10),Ref(L,-15))),-1),Max(Max(H,Ref(H,-20)),Max(Ref(H,-10),Ref(H,-15))),PREV)); ... |
|
|||||||
![]() |
|
|
Thread Tools |
|
#1
|
|||
|
|||
|
can anyone change this afl to meta trader format thanx in advance prev=AMA2(C,1,0); d=IIf(C>Ref(Max(Max(H,Ref(H,-20)),Max(Ref(H,-10),Ref(H,-15))),-1),Min(Min(L,Ref(L,-20)),Min(Ref(L,-10),Ref(L,-15))), IIf(C<Ref(Min(Min(L,Ref(L,-20)),Min(Ref(L,-10),Ref(L,-15))),-1),Max(Max(H,Ref(H,-20)),Max(Ref(H,-10),Ref(H,-15))),PREV)); a=Cross(Close,d); b=Cross(d,Close); state=IIf(BarsSince(a)<BarsSince(b),1,0); s=state>Ref(state,-1); ss=state<Ref(state,-1); sss=state==Ref(state,-1); col=IIf(state == 1 ,51,IIf(state ==0,4,1)); Plot(C,"",Col,64); PlotShapes( shapeUpArrow * s ,6,0,L); PlotShapes( shapeDownArrow *ss ,4,0,H); Filter = s OR sss OR sss ; AddColumn(C,"close",1.2); AddColumn( IIf( s, 66,1 ), "buy", formatChar, 1, bkcolor =IIf (s,colorYellow, colorPink )); AddColumn( IIf( Ss, 83,1 ), "sell", formatChar, 1, bkcolor =IIf (Ss,colorPink, colorYellow )); AddColumn( IIf( sss, 87,1 ), "wait", formatChar, 1, bkcolor =IIf (sss,colorYellow, colorRed )); _SECTION_BEGIN(""); _N(Title = "{{NAME}} - {{INTERVAL}} {{DATE}}: "+_DEFAULT_NAME()+" : {{OHLCX}} {{VALUES}}" +"\n"+EncodeColor(colorYellow)+ WriteIf(s,"EXIT all Short positions\nif trading long positions, enter long Now-\nOR at the market price on tomorrow's Open with stop="+EncodeColor(4)+WriteVal(L+.75*ATR(5),1.4)+" ,","")+ WriteIf(ss,"exit all long positions today with a Market On Close (MOC) order\nOR at the market price on tomorrow's Open with stop="+EncodeColor(4)+WriteVal(Ref(H+.75*ATR(5), -1),1.4)+",","")+ WriteIf( sss ,"No trading signals today.","") ); _SECTION_BEGIN("swing1"); no=20; res=HHV(H,no); sup=LLV(L,no); avd=IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0)); avn=ValueWhen(avd!=0,avd,1); supres=IIf(avn==1,sup,res); a=Cross(C,supres); b=Cross(supres,C); style = a * styleStaircase + b * styleStaircase; PlotShapes(a,style, IIf(a,colorGreen,colorRed), 0, IIf(a,Low,High)); _SECTION_END(); _SECTION_BEGIN("trend"); uptrend=PDI(20)>MDI(10)AND Signal(29)<MACD(13); downtrend=MDI(10)>PDI(20)AND Signal(29)>MACD(13); Plot( 2, /* defines the height of the ribbon in percent of pane width */"ribbon", IIf( uptrend, colorGreen, IIf( downtrend, colorRed, 0 )), /* choose color */ styleOwnScale|styleArea|styleNoLabel, -0.5, 100 ); _SECTION_END(); //d = Close > Ref( ChandelierHL(ATR(3),20), -1); //e =Close < Ref( ChandelierHL(ATR(3),20), -1); //f = Close < Ref( ChandelierHL(ATR(3),20), -1); //g = Close > Ref( ChandelierHL(ATR(3),20), -1); Buy = s AND a AND uptrend ; Short = ss AND b AND downtrend ; Sell = ss AND b AND downtrend ; Cover = s AND a AND uptrend ; Buy=ExRem(Buy,Sell); Sell=ExRem(Sell,Buy); Cover=ExRem(Cover,Short); Short=ExRem(Short,Cover); Filter=Buy OR Sell; Filter= Cover OR Short; AddColumn( Buy, "Buy", 1); AddColumn(Sell, "Sell", 1); AddColumn(Close,"Close",1.2); AddColumn(Volume,"Volume",1.0); _SECTION_BEGIN("Volume"); Plot( Volume, _DEFAULT_NAME(), ParamColor("Color", colorLavender ), styleNoTitle | ParamStyle( "Style", styleHistogram | styleOwnScale | styleThick | styleNoLabel, maskHistogram ), 2 ); _SECTION_END(); // Plot the Buy and Sell arrows. shape = Buy * shapeUpArrow + Sell * shapeDownArrow; PlotShapes(shape, IIf(Buy,colorGreen,colorRed), 0, IIf(Buy,Low,High)); Plot(supres,"Swing",colorYellow,styleStaircase); SetChartBkGradientFill( ParamColor("BgTop", ColorRGB( 172,172,172 )), ParamColor("BgBottom", ColorRGB( 172,172,172 )),ParamColor("titleblock",ColorRGB( 172,172,172 ))); GraphXSpace = 5; |
| Sponsored Links |
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads for: coversion from afl to metatrader
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| coversion from amibroker to metastock | sudhirgudwani | AmiBroker | 0 | 21st November 2011 11:49 PM |
| metatrader into metastock | deuce | MetaStock | 7 | 25th December 2010 03:24 AM |
| Metatrader | renu daga | Software | 14 | 30th May 2010 01:06 AM |
| MetaTrader 4 data into AG eod | ace | Advanced GET | 4 | 6th March 2010 03:48 PM |
| Metatrader | hir0406 | Software | 2 | 17th August 2009 02:16 AM |
Indemnity, Disclaimer & Disclosure
Notice:
• By visiting Traderji.com you automatically indicate that you agree to our Forum Rules, Indemnity, Disclaimer & Disclosure Notice and General Content Disclaimer Notice and indemnify Traderji.com, its
associates and related parties of all claims howsoever resulting from
the usage of the forum/site.
• 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. You are recommended to make appropriate enquiries and seek appropriate advise before sending money, incurring any expenses, acting on recommendations or entering into any commitment in relation to any advertisement published here. Traderji.com does not vouch for any claims made by the advertisers of products and services. Traderji.com will not be held liable for any consequences in the event such claims are not honoured by the advertisers. Traderji.com will not be liable for
any, direct or indirect, consequential or incidental damages or loss arising out of the use of any information by anybody mentioned anywhere on this site.
• 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 or legality of any 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. Although we constantly delete all irrelevant content and/or SPAM, if you should 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.