Traderji.com - Discussion forum for Stocks Commodities & Forex

Discussion on kolkata meet signal

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 = ...


Go Back   Traderji.com - Discussion forum for Stocks Commodities & Forex > TOOLS & RESOURCES > Software > MetaStock

Notices


Advertise Here

Reply
 
Thread Tools
Sponsored Links
  #61  
Old 22nd April 2008, 08:52 PM
SGM SGM is offline
Member
 
Join Date: Aug 2005
Location: PUNE
Posts: 468
Blog Entries: 14
Thanks: 11
Thanked 41 Times in 12 Posts
SGM will become famous soon enough
Reputation: 81
Default Re: Discussion on kolkata meet signal

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);
chk if this is what u want,

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.
Reply With Quote
Sponsored Links
  #62  
Old 22nd April 2008, 09:21 PM
Member
 
Join Date: Nov 2006
Posts: 1,496
Thanks: 55
Thanked 67 Times in 36 Posts
kkseal will become famous soon enoughkkseal will become famous soon enough
Reputation: 131
Default Re: Discussion on kolkata meet signal

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;
}
Will do some more checking with odd/even periods later.

Regards,
Kalyan.

Last edited by kkseal; 23rd April 2008 at 01:39 AM. Reason: Changed Y to X
Reply With Quote
  #63  
Old 22nd April 2008, 09:23 PM
Member
 
Join Date: Nov 2006
Posts: 1,496
Thanks: 55
Thanked 67 Times in 36 Posts
kkseal will become famous soon enoughkkseal will become famous soon enough
Reputation: 131
Default Re: Discussion on kolkata meet signal

Sanjay, will check everything later. Taking a break. Thanks for your help.

Regards,
Kalyan.
Reply With Quote
  #64  
Old 22nd April 2008, 09:38 PM
Member
 
Join Date: Nov 2006
Location: calcutta
Posts: 2,047
Thanks: 205
Thanked 310 Times in 202 Posts
renu daga is just really nicerenu daga is just really nicerenu daga is just really nicerenu daga is just really nice
Reputation: 361
Default Re: Discussion on kolkata meet signal

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
Reply With Quote
  #65  
Old 23rd April 2008, 01:47 AM
Member
 
Join Date: Nov 2006
Posts: 1,496
Thanks: 55
Thanked 67 Times in 36 Posts
kkseal will become famous soon enoughkkseal will become famous soon enough
Reputation: 131
Default Re: Discussion on kolkata meet signal

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();
TEST CODE :-
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.
Reply With Quote
  #66  
Old 23rd April 2008, 09:55 AM
Moderator
 
Join Date: Nov 2005
Posts: 10,235
Thanks: 1,014
Thanked 1,941 Times in 773 Posts
uasish has a reputation beyond reputeuasish has a reputation beyond reputeuasish has a reputation beyond reputeuasish has a reputation beyond reputeuasish has a reputation beyond reputeuasish has a reputation beyond reputeuasish has a reputation beyond reputeuasish has a reputation beyond reputeuasish has a reputation beyond reputeuasish has a reputation beyond reputeuasish has a reputation beyond reputeuasish has a reputation beyond repute
Reputation: 2017
Default Re: Discussion on kolkata meet signal

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
Reply With Quote
  #67  
Old 23rd April 2008, 12:17 PM
Member
 
Join Date: Oct 2006
Posts: 440
Thanks: 1
Thanked 28 Times in 18 Posts
raosrinivas is on a distinguished road
Reputation: 48
Default Re: Discussion on kolkata meet signal

uasish's observation about RSI regarding 3 up moves below 50, looks good one. checking past charts giving positive results.
Reply With Quote
  #68  
Old 23rd April 2008, 01:18 PM
Member
 
Join Date: Nov 2006
Posts: 1,496
Thanks: 55
Thanked 67 Times in 36 Posts
kkseal will become famous soon enoughkkseal will become famous soon enough
Reputation: 131
Default Re: Discussion on kolkata meet signal

Quote:
Originally Posted by uasish View Post
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
Actually Asishda, as a MA, i don't think this is a bad one. Good balance of smoothness & response. It'll carry the usual disadv of MAs off-course, but even then i think new testing will yield better results. We also need to rethink the entry. More later.

Regards,
Kalyan.
Reply With Quote
  #69  
Old 23rd April 2008, 01:54 PM
Moderator
 
Join Date: Nov 2005
Posts: 10,235
Thanks: 1,014
Thanked 1,941 Times in 773 Posts
uasish has a reputation beyond reputeuasish has a reputation beyond reputeuasish has a reputation beyond reputeuasish has a reputation beyond reputeuasish has a reputation beyond reputeuasish has a reputation beyond reputeuasish has a reputation beyond reputeuasish has a reputation beyond reputeuasish has a reputation beyond reputeuasish has a reputation beyond reputeuasish has a reputation beyond reputeuasish has a reputation beyond repute
Reputation: 2017
Default Re: Discussion on kolkata meet signal

OK i think both Sanjay & self will be in Loop.
Reply With Quote
  #70  
Old 23rd April 2008, 10:00 PM
Member
 
Join Date: Nov 2006
Posts: 1,496
Thanks: 55
Thanked 67 Times in 36 Posts
kkseal will become famous soon enoughkkseal will become famous soon enough
Reputation: 131
Default Re: Discussion on kolkata meet signal

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
Reply With Quote
Sponsored Links

Reply

Bookmarks


Advertise Here


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT +5.5. The time now is 05:06 PM.

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.
 


Copyright © 2001 - 2008, Traderji.com All Rights Reserved.

Recommended Websites - www.TradersEdgeIndia.com - www.TradingPicks.com - www.MasterOfTrading.com