logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

2 Pages<12
Options
Go to last post Go to first unread
wabbit  
#21 Posted : Saturday, May 20, 2006 9:15:02 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Asish, I have already commented that using the Zig(), Peak() and Trough() can be EXTREMELY damaging to your trading account. I STRONGLY RECOMMEND YOU DO NOT USE THESE INDICATORS IN ANY TRADING SYSTEM. And it appears to me that you are writing some sort of trading system using these indicators! -- That said, lets look again at the last snippet of code you posted. a:=Peak(2,Zig(H,.75,$),.1); b:= Peak(1,Zig(H,.75,$),.1); m:=If(a>b,1,0); This is OK so far (other than the fact it is using hindsight!) I take it you are looking for the stock to make a higher peak than previous, and to do this you are using the Zig() function. The MS Users Manual and the thousand posts on this forum discuss the problems with the Zig() function. I take you are aware the Zig() function will not indicate a peak in the price until that has been rising is now falling? Your code will show the stocks that have been climbing in price, then falling by at least 75 (currency units), then rising by more than previously, but now falling again by more than 75 (currency units). Is this what you really want? You want to find falling stocks, particularly stocks that have fallen by more than 75 (currency units)? That's what your code is looking for. The m:=If(a>b,1,0); is more easily written: m:=a>b; the results are the same. The Alert(m,5) bit: a>b will be true for the entire period from the last peak until a third peak is formed MS will then look at the new peak and compare it to the one previous. Only then will the value of m change. You could leave this section out completely! Try plotting the peak() function and the a>b together on the same plot and see when the values change. -- Anyway, could you please write down in your next post EXACTLY what you are trying to achieve in your system. I have been helping you for a little while and have no idea of what you are trying to achieve. I have warned you against using the hindsight indicators and you continue to use them. Your "system" seems to be chopping and changing direction randomly. I think I have done enough to help you for now, as I do not like the direction you are going. Although I am willing to help, I should not help you build you something that you cannot explain and that I think will not work. It is a waste of my time and yours. If you like, you can buy my time and services, or Jose's or someone else to build a tradable system that does not use hindsight indicators, but to do so you are going to have to explicitly explain what you are trying to achieve. Either way, whether using free help or contact code writers, you are going to have to explain what you are trying to achieve. wabbit :D P.S. If you are having trouble explaining your system in English because it is not your native tongue, I am sure there will be someone else on the Forum who could help translate your ideas into English, or maybe another friend or family member. All you have to do is ask.
uasish  
#22 Posted : Sunday, May 21, 2006 12:23:21 PM(UTC)
uasish

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 8/13/2005(UTC)
Posts: 170

Thanks: 7 times
Respected Mr Wabbit, My Objective: 1)“Shorting” in Intra Day.{Directional call based on EOD data } 2)Using Zig’s Peak to identify the stock for me. Hence this code : a:=Peak(2,Zig(H,.75,$),.1); b:= Peak(1,Zig(H,.75,$),.1); m:=a> b ;{Thks once again for your help here} My 2nd Objective:{ To Test the same in System Tester} A “Buy to cover order” 1) a:=Peak(2,Zig(H,.75,$),.1); b:= Peak(1,Zig(H,.75,$),.1); m:=a > b ; n:= Trough(1,Zig(H,.75,$),.1)> Ref(Trough(1,Zig(H,.75,$),.1),-1); BarsSince(m AND n) I am fully aware of the following: a)Using Zig ,Peak,Through in a trading system is risky for it’s last leg’s unpredictable dynamism .(Am moved for your true care & concern shown to a new (rude) member like me through this statement “damaging to your trading account.”) b)But isn’t this the one of the best indicator in MS to identify the “Correction” for me .Hence utilize it’s hindsight- is my logic. b)My Buy to cover order for system tester; will produce too many “Whip Lass”,still I want to develop this to practically see how much % gain (if any) by back testing in System Tester. I very much appreciate your offer for professional help, let me 1st Sincerely try & fail .I am still convinced that my failures are due to my insincere efforts.The time & care you have shown to my code development ,without any material interest truly reflects your humane nature & justifies your status in this voluntary service “Forum”.Pardon me for my Inability to express ,that is more due to the hazy state of mind moreover English not being my native language. Regards Asish
wabbit  
#23 Posted : Sunday, May 21, 2006 1:35:04 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Asish. I have deleted a couple of the extraneous posts just to clean up the thread a little. Do not be alarmed. wabbit :D
wabbit  
#24 Posted : Monday, May 22, 2006 12:33:28 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Asish, Now I have a better understanding of what you are trying to achieve. Again I must caution you against using the hindsight indicators. Anyway... My interpretation your trading system is this. This is your short entry signal? a:=Peak(2,Zig(H,.75,$),.1); b:= Peak(1,Zig(H,.75,$),.1); m:=a>b; You are looking for the most recent peak to be lower than the preceeding peak. Have a look at Jose's site again. He has some excellent code in his divergence indicators to find higher/lower peaks/troughs that aren't using these lookback indicators. The m:=a>b; produces regions where this is true or false. Although the value of 'm' changing from zero to one will trigger the system tester to enter the short trade, it would be neater to have a single signal generated: m:=a>b; ShortEntry:=m AND Alert(m=0,2); which is the same as: m:=a> b; ShortEntry:=m AND Ref(m,-1)=0; whichever you use is up to you. You are also going to be missing out on a lot of action in "younger" stocks, as the Zig() function has to generate the required number of peaks and troughs for your system to have its signals. Hard coding the peak-finding and trough-finding code might present you with more tradable signals. -- Consider using variables to make your code easier to read and edit. z:=Zig(H,.75,$); a:=Peak(2,z,1); b:= Peak(1,z,1); m:=a> b; Now you can change the effect in both the a and b variable just by editing the z variable. Its much easier. Also, as the Zig() function rockets to the peak and then plummets down the other side, you can actually use quite large values of change in the Peak(Zig()) functions. Whilst we're at it, one day you might want to write a really long indicator and be struggling to fit all the code in the limited space MS allows. Get used to writing abbreviated code, as required by the circumstances: z:=Zig(H,.75,$); m:=Peak(2,z,1)>Peak(1,z,1); SE:=m AND Alert(m=0,2); This is neat, easily edited and still very readable. -- A “Buy to cover order” is just a 'tecchie' way of saying Short Exit (well it is to me!) z:=Zig(H,.75,$); m:=Peak(2,z,1)>Peak(1,z,1); n:= Trough(1,z,1)> Ref(Trough(1,z,1),-1); BarsSince(m AND n) The first lines of code are from above, however the last two (the parts that are going to actually trigger the short exit need some refinement) -- Although you are going to be working on IntraDay data, all bars (EOD or intraday) form patterns. You and I do not trade the same exchanges, so I cannot easily demonstrate the next part, so I am going to use the Dow Jones Industrials Index as an example. Hopefully you get this index and can look at the same plot as me. I have modified the code slightly from the code above for demonstration purposes: z:=Zig(H,5,%); {a 5% swing is required to form a new peak/trough} m:=Peak(2,z,1)>Peak(1,z,1); n:=Trough(1,z,1)>Ref(Trough(1,z,1),-1); x:=BarsSince(m AND n); {plots} m;n;{x throws out the scaling too much!} Also plot Zig(H,5,%) directly on the chart so you can see the Zig() from which the Peak() and Trough() functions are created. If you plot the criteria you are looking for on the chart of the Dow, you will notice that rarely is the 'n' variable formed inside the region of 'm' This means that when short, you are going to be holding this losing position for a loooong time. This isn't true only for the Dow, plot these indicators on any chart and yo will see the same effects. Without even using the system tester I can see that your system will only end in dispair. This is of course in addition to the exit trigger not being fired until the Trough() has been formed which will be a number of days AFTER the local-bottom of the market. This is the dynamic nature of the Zig(). Again, Jose has some excellent examples that I strongly urge you to look at. -- Why must 'n' be fired only when 'm' is true? What I think you really meant was for the system to be latched to exit the short trade on the first 'n' after the first time 'm' was true? If this is the case then all you need to do is have a look at Roy Larsen's awesome latching code, or even more simply, get the forum.dll which has a latch function built in. If you don't need the latch, then I fail to understand the intent of your code. Sorry. -- I have written a rather lengthy post. I will leave you some time to look over it. Please have a look at the indicators on the EOD chart of the Dow. If you use this chart as a template, then we can work on building the system simultaneously. It might also be worthwhile you posting the chart (with your interpretation of the indicators and comments) wabbit :D
uasish  
#25 Posted : Monday, May 22, 2006 2:25:33 PM(UTC)
uasish

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 8/13/2005(UTC)
Posts: 170

Thanks: 7 times
Respected Wabbit, Thks for ur guidance.Have to go through your mail & then revert back.Indian stock exchange was Freezed to day for 1 hour due to heavy downslide.Going for a two day vacation. Regards Asish
uasish  
#26 Posted : Friday, June 30, 2006 12:42:52 PM(UTC)
uasish

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 8/13/2005(UTC)
Posts: 170

Thanks: 7 times
Dear Sir, I didnt knew that i have to post "Resolved" Regards Asish
wabbit  
#27 Posted : Saturday, July 1, 2006 2:57:47 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Dear Asish, So the issue is resolved? You are happy there is no more information required to answer the original question? If so, please edit the very first post in the thread and add [RESOLVED] to the end of the subject. If the whole [RESOLVED] doesn't fit into the subject line, just delete enough characters from the end of the subject so that the entire [RESOLVED] can fit into the subject line. If you need any help, or would like one of the Team to do it for, just ask. Could you also please check on any other threads that you have started to see if those issues have been resloved, and if so, please mark those threads as resolved too. wabbit :D
uasish  
#28 Posted : Wednesday, July 5, 2006 1:47:07 PM(UTC)
uasish

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 8/13/2005(UTC)
Posts: 170

Thanks: 7 times
uasish wrote:
Respected Seniors, I am finding mis match value of the indicator parked on my chart & in exploration reports.Even in inspection of exploration combo box for each security the value actually shown in the final list varies than that within the inspection box of that scrip. Initially i thought as Trough uses Zig whose last leg being dynamic this was happening.But even if i use DX() the same problem.Can u suggest how to get the value showing in the chart to get in exploration also in the same Day otherwise BarsSince also delays by another day. Regards Asish
Sir, The problem is now Resolved. regards Asish [RESOLVED]
Users browsing this topic
Guest (Hidden)
2 Pages<12
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.