![]() |
|
| Discuss Discussion on kolkata meet signal at the MetaStock within the Traderji.com - Discussion forum for Stocks Commodities & Forex; Code: _SECTION_BEGIN("Kalyan_Modification"); a = Param("Angle",30,15,45,1); a = (22/7) * (a/180); Num = 0; Den = ... |
|
|||||||
| Notices |
![]() |
|
|
Thread Tools |
| Sponsored Links |
|
#61
|
|||
|
|||
|
Code:
_SECTION_BEGIN("Kalyan_Modification");
a = Param("Angle",30,15,45,1);
a = (22/7) * (a/180);
Num = 0;
Den = 0;
n = Param("Sin_Len",3,1,100,1);
Count = 0;
for (i = 1;i < n+1;i++)
{
if ((n%2 == 0) AND (i == n/2 + 1)) Count = Count;
else
{
if (i <= n/2) Count = Count + 1;
else Count = Count -1;
}
Num = Num + sin(Count*a) * Ref(C,-i-1) ;
Den = Den + sin(Count*a);
}
j1 = Num / Den;
Plot(IIf(j1 > Ref(j1,-1),-10,10),"j1",IIf(j1 > Ref(j1,-1),colorBlueGrey,colorLime), styleThick);
edit: ok understood the prob with even num, will fix it edit: Done, now check it Last edited by SGM; 22nd April 2008 at 09:05 PM. |
| Sponsored Links |
|
#62
|
|||
|
|||
|
Ok this seems to be working
HTML Code:
for(i=1; i<=pd; i++)
{
if(pd%2==0 AND i > pd/2) X = sin((i-1)*a);
else X = sin(i*a);
Num = Num + X*Ref(P,1-i);
Den = Den + X;
}
Regards, Kalyan. Last edited by kkseal; 23rd April 2008 at 01:39 AM. Reason: Changed Y to X |
|
#63
|
|||
|
|||
|
Sanjay, will check everything later. Taking a break. Thanks for your help.
Regards, Kalyan. |
|
#64
|
|||
|
|||
|
hi
gsm... since i got apm from u,,,regarding asish das signal,,as u wanted it,,,so kindly check the link in kolkata meet thread where sunando da has uploaded the signal since th e signal file is more than 100...kb so i can post it here for u,, still any problem,,then add me to ur messenegr id if u ahve i can transfer teh indicator file to u,,,no problem renu |
|
#65
|
|||
|
|||
|
Code for the Indicator:-
HTML Code:
_SECTION_BEGIN("Asish_Indicator_01");
a = Param("Angle",30,15,45,1);
pd = Param("Period",5,4,6,1);
P = ParamField("Price field",3);
a= (22/7)*(a/180);
Num = 0;
Den = 0;
for(i=1; i<=pd; i++)
{
if(pd%2==0 AND i > pd/2) X = sin((i-1)*a);
else X = sin(i*a);
Num = Num + X*Ref(P,1-i);
Den = Den + X;
}
if (den!=0) j1 = Num / Den;
Plot(j1,"j1",IIf(j1 > Ref(j1,-1),colorBlueGrey,colorLime),styleThick);
_SECTION_END();
For 4 period :- Num = (sin(1*a) * P) + (sin(2*a) * Ref(P,-1)) + (sin(2*a) * Ref(P,-2)) + (sin(3*a) * Ref(P,-3)) ; Den = sin(a) + sin(2*a) + sin (2*a) +sin(3*a); For 5 period :- Num = sin(1*a) * P + sin(2*a) * Ref(P,-1) + sin(3*a) * Ref(P,-2) + sin(4*a) * Ref(P,-3) + sin(5*a) * Ref(P,-4); Den = sin(a) + sin(2*a) + sin (3*a) + sin(4*a) + sin(5*a); For 6 period :- Num = (sin(1*a) * P) + (sin(2*a) * Ref(P,-1)) + (sin(3*a) * Ref(P,-2)) + (sin(3*a) * Ref(P,-3)) + (sin(4*a) * Ref(P,-4)) + (sin(5*a) * Ref(P,-5)); Den = sin(a) + sin(2*a) + sin (3*a) +sin(3*a) + sin(4*a) + sin(5*a); Beyond the 4-6 period range the Sine weighting does not make sense imo. (Restricted to half-a-cycle. If i remember correctly John Ehler does the same for his Sine Wave oscillator) Regards, Kalyan. Last edited by kkseal; 23rd April 2008 at 01:54 AM. |
|
#66
|
|||
|
|||
|
Kalyan,
Yes this statement of your post ......... "(Restricted to half-a-cycle. If i remember correctly John Ehler does the same for his Sine Wave oscillator)" i have experimented few & found to be right.Nice exercise going on ,mostly by you & Sanjay.A Learning process of how things are approached ;may be this indicator is not upto the mark but still this is how conceptually things are approached than simple Copy Paste,thks for showing us. Asish |
|
#67
|
|||
|
|||
|
uasish's observation about RSI regarding 3 up moves below 50, looks good one. checking past charts giving positive results.
|
|
#68
|
|||
|
|||
|
Quote:
Regards, Kalyan. |
|
#69
|
|||
|
|||
|
OK i think both Sanjay & self will be in Loop.
|
|
#70
|
|||
|
|||
|
Sorry folks. Too price hugging too avoid whipsaws. A few can be avoided by using (H+L)/2 or avg price* as the price field with Sanjay's code (few more by using a technique i use with MAs though it's a little discretionary) but most remain.
Maybe someone will come up with a better idea. Regards, Kalyan. * (H+L+C)/3 in Ami |
| 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.