|
|
|
|
|||||||
| Coding Forum Collaborate, receive help, or discuss coding related issues. |
![]() |
| Bookmarks | |||||||
del.icio.us
|
StumbleUpon
|
Google
|
Digg
|
Facebook
|
Furl
|
Reddit
|
Netscape
|
|
|
LinkBack | Thread Tools | Display Modes | Language |
|
|||
|
Allocating Trading Day Number
Hi,
Anyone can help to translate the following Metastock code into TS2000i compatiable code? The indicator allocate a number to each trading day and reset to zero following a new month. ========================= ========================= ==== { User input } EOM:=Input("Final month's end: [1]True, [2]Current (dynamic)",1,2,1); { Choice of Static/Dynamic last EOM signal } EOM:=If(EOM=2,Cum(1)=Last Value(Cum(1)), DayOfMonth()=31); { Start of month } nuMonth:=Month()<>Ref(Mon th(),-1) OR Cum(1)=2; { End of month } monthEnd:=PeakBars(1, -(nuMonth OR Cum(IsDefined(nuMonth))=1 ),1)=0 OR EOM; { Plot signals in own window } nuMonth;-monthEnd BarsSince(nuMonth) ========================= ========================= ===== Regards. |
|
|||||||||||||||||||||||||||
|
Re: Allocating Trading Day Number
|
|||||||||||||||||||||||||||
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Normal expected move for x economic number | walterw | Market Analysis | 7 | 06-03-2007 04:53 AM |
| Number of Markets to Trade | ant | Beginners Forum | 43 | 10-22-2006 06:07 AM |