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
 Funzione Max (ArrayData, [Period], [Since])

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
alcor Posted - 12 November 2006 : 16:02:45
Buongiorno,

potete dirmi cosa scrivere nel campo [Since] per fare in modo che la funzione:

Max (ArrayData, [Period], [Since])

Cominci l’esplorazione dal periodo -1 (escludendo quindi il periodo zero o current bar)

Grazie,

Alcor
1   L A T E S T    R E P L I E S    (Newest First)
SupportoTecnico Posted - 12 November 2006 : 19:11:31
Non è possibile fare quello che dici utilizzando la proprietà "Since" in quanto questa si usa per indicare il punto di partenza e non quello di arrivo come invece vuoi tu. La funzione "Max" infatti calcola il massimo partendo da un certo periodo nel passato e andando in avanti fino a CurrentBar.

Quindi devi per forza costruirti una tua funzione "Max" personalizzata. Il che è molto semplice:


Function MyMax(lPeriods as Numeric) As Numeric
Dim i as Numeric
Dim dMyVal as Numeric

dMyVal = 0
For i = 1 to lPeriods
If (Close( - i) > dMyVal) then
dMyVal = Close( - i)
EndIf
Next i

Return dMyVal

EndFunction

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