![]() |
|
| Discuss Discussion on kolkata meet signal at the MetaStock within the Traderji.com - Discussion forum for Stocks Commodities & Forex; Originally Posted by SGM Hello Vikram From your chart, it seems you would get decent ... |
|
|||||||
| Notices |
![]() |
|
|
Thread Tools |
| Sponsored Links |
|
#31
|
|||
|
|||
|
Quote:
will try to apply on sum other chart & post it. the question is not how many stops in a row.say u hold a future position according to the chart ive given & u loose 2 times in a row.wud u be in a position mentally to take the 3rd trade. also if u put too tight stops then there are more chances to be stopped out on a good winning trade,so u have to give sum leaveway. i am attaching the renko chart of aban with a brick size = 100 with the indicator on top of it.i think the stuf is self explanatory so the thing to be considered is : 1)if i trade a simple renko which takes me 1 min to understand,i win most of the time with stop below the 1st brick 2)shud i go for indicators & oscillators & stuff like tht. 3)can u take a trade solely on the kol meet indicator or u have to use sumthing else in conjunction with it. for ex : ive read in books candlesicks works best with stochastics. wht do u suggest???? N.B. wanted to clear sum doubts of mine regarding the renko. Last edited by vvvv; 29th May 2008 at 12:42 PM. |
|
#32
|
|||
|
|||
|
Study MAs first - their construction, pros & cons, watch them on charts & you'll get your answers No point in rushing into 'crocodiles' & 'butterflies' without knowing the basics.
Regards, Kalyan. |
|
#33
|
|||
|
|||
|
Hello
Yesterday Asishda send me some metastock code to be converted to Amibroker afl and post on the forum, I guess his intention was to provide an open code so that the collaboration effort can continue. He also asked me to do back tests and publish the performance. Regards Sanjay So here we go. Original Code Code:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx K:= C; a:=30; S1:=Sin(1*a)*K; S2:=Sin(2*a)*Ref(K,-1); S3:=Sin(3*a)*Ref(K,-2); S4:=Sin(4*a)*Ref(K,-3); S5:=Sin(5*a)*Ref(K,-4); Num:=S1+S2+S3+S4+S5; Den:=Sin(a)+Sin(2*a)+Sin(3*a)+Sin(4*a)+Sin(5*a); j1:= Num/Den; j1; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|
#34
|
|||
|
|||
|
Code translated into an AFL
Code:
_SECTION_BEGIN("Asish_Indicator_01");
a = Param("Len",30,15,45,1);
Num = sin(1*a) * C + sin(2*a) * Ref(C,-1) + sin(3*a) * Ref(C,-2) + sin(4*a) * Ref(C,-3) + sin(5*a) * Ref(C,-4);
Den = sin(a) + sin(2*a) + sin (3*a) + sin(4*a) + sin(5*a);
j1 = Num / Den;
_SECTION_END();
|
|
#35
|
|||
|
|||
|
The original code did not have any buy / sell conditions but gave us a wiggly (j1) when plotted on the charts.
The most common things we can do with wigglies is
I have back tested the code only using 1, will also provide code for 2, so members can even test for that. You can also add to this list. Code:
_SECTION_BEGIN("Asish_Indicator_01");
a = Param("Len",30,15,45,1);
Num = sin(1*a) * C + sin(2*a) * Ref(C,-1) + sin(3*a) * Ref(C,-2) + sin(4*a) * Ref(C,-3) + sin(5*a) * Ref(C,-4);
Den = sin(a) + sin(2*a) + sin (3*a) + sin(4*a) + sin(5*a);
j1 = Num / Den;
Plot(j1,"j1",IIf(j1 > Ref(j1,-1),colorBlueGrey,colorLime),styleThick);
_SECTION_END();
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("Signal01");
Buy = j1 > Ref(j1,-1);
Sell = j1 < Ref(j1,-1);
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
Short = j1 < Ref(j1,-1);
Cover = j1 > Ref(j1,-1);
Short = ExRem(Short,Cover);
Cover = ExRem(Cover,Short);
//Position size fixed 100 units
SetPositionSize(100,4);
SetTradeDelays(1,1,1,1);
PlotShapes(shapeUpArrow * Buy, colorBlue,0, L,-10);
PlotShapes(shapeDownArrow * Short, colorRed,0, H, -10);
_SECTION_END();
|
|
#36
|
|||
|
|||
|
The back test reports
For backtesting Ami backtester was used. Brokerage of 2 points is considered for every trade (1 point on each side). All 6 runs are done with EoD data. After the signal is triggered buy/sell price is considered as the next bar's open price. No slippage is considered. Initial Capital 500000 Backtest Summary for Spot Nifty EoD, with default settings. Code:
Period Trades win Loss Net Gain/Loss in Points 01 Jan 2008 - April 17 2008 33 15 18 899 01 Jan 2007 - Dec 31 2007 122 46 76 -9 01 Jan 2000 - Dec 31 2006 812 330 482 -1978 Last edited by SGM; 21st April 2008 at 07:47 PM. |
|
#37
|
|||
|
|||
|
The code for Above/Below Condition
Code:
_SECTION_BEGIN("Signal 02");
Buy = C > j1;
Sell = C < j1;
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
Short = Sell;
Cover = Buy;
Short = ExRem(Short,Cover);
Cover = ExRem(Cover,Short);
//Position size fixed 100 units
SetPositionSize(100,4);
SetTradeDelays(1,1,1,1);
PlotShapes(shapeUpArrow * Ref(Buy,-1), colorBlue,0, L,-10);
PlotShapes(shapeDownArrow * Ref(Short,-1), colorRed,0, H, -10);
_SECTION_END();
Replace SetPositionSize(100,4); with SetPositionSize(100000,1); |
|
#38
|
|||
|
|||
|
wosh, it took me more than double the time to post compared to code and backtest. Anyway, heres the last one with back test report of Nifty Futures
NF, EoD, 01 Jan 2008 - April 17 2008 NF, Hourly, 01 Jan 2008 - April 17 2008 Please do your own test before drawing any conclusions. The code is available, so shouldn't be a problem to convert into anything. Regards Sanjay Last edited by SGM; 21st April 2008 at 08:08 PM. |
|
#39
|
|||
|
|||
|
sanjay,
i want to learn AFL..from where do i start . pls name sum resources.& give sum tips |
|
#40
|
|||
|
|||
|
Quote:
moreover the line's for the kolkata meet indicator & the one in which the code is given doesnt match |
| 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.