Insider 3000 - Forums
Insider 3000 - Forums
Home | Profile | Active Topics | Members | Search | FAQ
 All Forums
 Problemi con "Insider 3000 versione 3"
 Problemi col linguaggio di programmazione
 Costruire un indicatore tipo RSI

Note: You must be registered in order to post a reply.

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert Email Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   
   

T O P I C    R E V I E W
jsamu Posted - 26 October 2003 : 18:28:56
Vorrei costruire un indicatore simile al RSI ma che invece di utilizzare la media chiusure positive o negative consideri la somma in un determinato periodo di tempo. Ma non vedo proprio nulla…
Dove sbaglio questa volta?

Function Main()

dim i as Numeric
dim ChiusuraSu as Numeric
dim ChiusuraGiu as Numeric

i = 0
ChiusuraSu = 0
ChiusuraGiu = 0

Do until (i <= periodo)
If close > open Then
ChiusuraSu = ChiusuraSu + 1
Endif

If close < open Then
ChiusuraGiu = ChiusuraGiu + 1
Endif

i = i + 1

Loop

'Return ChiusuraSu
Return 100 - (100 / (1 + (ChiusuraSu / ChiusuraGiu)))

Endfunction

Property periodo as Numeric
Default (14)
EndProperty


1   L A T E S T    R E P L I E S    (Newest First)
SupportoTecnico Posted - 27 October 2003 : 11:18:04
C'erano diverse imprecisioni. Prova questo:

Function Main()

dim i as Numeric
dim ChiusuraSu as Numeric
dim ChiusuraGiu as Numeric

i = 0
ChiusuraSu = 0
ChiusuraGiu = 0

for i = 0 to periodo - 1
If close( - i) > open( - i) Then
ChiusuraSu = ChiusuraSu + 1
Endif

If close( - i) < open( - i) Then
ChiusuraGiu = ChiusuraGiu + 1
Endif
next i

if (ChiusuraGiu <> 0) then
Return 100 - (100 / (1 + (ChiusuraSu / ChiusuraGiu)))
else
Return 0
endif

Endfunction

Property periodo as Numeric
Default (14)
EndProperty


Insider 3000 - Forums © Copyright 2003-2016 Tradersoft s.r.l. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07