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
 Problema

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
Alessio Posted - 28 October 2003 : 13:09:27
Salve a tutti,
dopo aver modificato il listato, vorrei che oltre ad idicarmi il max ed il min della prima ora, mi indicasse anche il max ed il min della giorata e mi restituisse il numero delle barre la cui chiusura ?, per esempio, superiore al max della prima ora ( indicato con maxib) ed inferiore o uguale al max della giornata (indicato con maxd).
Io ho provato a scrivere la seguente, ma non funziona

dim MaxIB as Numeric = 0
dim MinIB as Numeric = 0
dim MaxD as Numeric = 0
dim MinD as Numeric = 0
dim plMemDate as Numeric = 0
dim count as Numeric

function Main()
dim i as Numeric
dim lIndex as Numeric = - 1
if (date <> plMemDate) then
For i = 0 to hour(10)
if ((time >= 900000) and (time <= 1030000)) then
MaxIB = close(i)
MinIB = close(i)
lIndex = i
Goto Prosegui1
endif
next i

Prosegui1:
if (lIndex > - 1) then
for i = lIndex to hour(10)
if ((time >= 900000) and (time <= 1030000)) then
if (MaxIB < close(i)) then
MaxIB = close(i)
endif
if (MinIB > close(i)) then
MinIB = close(i)
endif
endif
next i
plmemdate = date
endif
endif

dim j as Numeric
dim dindex as Numeric = - 1
If (date = plmemdate) then
For j = 0 to hour(17)
If (time > (1030000) and time < (1730000)) then
MaxD = close(j)
MinD = close(j)
dindex = j
Goto Prosegui2
endif
next j

Prosegui2:
if (dindex > - 1) then
for j = dIndex to hour(17)
if (time > (1030000) and time < (1730000)) then
if (MaxD < close(j)) then
MaxD = close(j)
endif
if (MinD > close(i)) then
MinD = close(j)
endif
endif
next j
plmemdate = date
endif
endif

postreste aiutarmi?

Grazie


4   L A T E S T    R E P L I E S    (Newest First)
Alessio Posted - 30 October 2003 : 20:18:15
Ok, ? ora tutto a posto.
Grazie

SupportoTecnico Posted - 28 October 2003 : 16:39:03
Prova questo codice:
devi solo aggiustare la riga del Return specificando la giusta condizione in cui desideri avere il segnale.
Le variabili pdMyMaxDay e pdMyMinDay contengono rispettivamente il massimo e il minimo di giornata.
Mentre pdMyMax e pdMyMin contengono il massimo e minimo della prima ora.




dim pdMyMax as Numeric = 0
dim pdMyMin as Numeric = 0
dim plMemDate as Numeric = 0
dim pdMyMaxDay as Numeric = 0
dim pdMyMinDay as Numeric = 0


function Main()
dim i as Numeric
dim lIndex as Numeric = - 1

if (date <> plMemDate) then
for i = CurrentBar - 1 to Totbar - 1
if ((time(i) >= 900000) and (time(i) <= 1000000)) then
pdMyMax = high(i)
pdMyMin = low(i)
lIndex = i
Goto Prosegui1
endif
next i

Prosegui1:
if (lIndex > - 1) then
for i = lIndex to Totbar - 1
if ((time(i) >= 900000) and (time(i) <= 1000000)) then
if (pdMyMax < high(i)) then
pdMyMax = high(i)
endif
if (pdMyMin > low(i)) then
pdMyMin = low(i)
endif
else
Goto Prosegui2
endif
next i
endif
Prosegui2:
plMemDate = date

pdMyMaxDay = High
pdMyMinDay = Low
for i = CurrentBar to Totbar - 1
if (Date (i) > plMemDate) Then
Goto Prosegui3
endif
if (pdMyMaxDay < high(i)) then
pdMyMaxDay = high(i)
endif
if (pdMyMinDay > low(i)) then
pdMyMinDay = low(i)
endif
next i
Prosegui3:
endif

return (high <= pdMyMax) and (low >= pdMyMin)

endfunction

Alessio Posted - 28 October 2003 : 15:06:59
Vorrei mettere in evideza il max. ed il min. della prima ora di contrattazzione e, successivamente, quello dell' intera giornata.
Non riesco, per?, ad impostare il ciclo For..Next.

SupportoTecnico Posted - 28 October 2003 : 14:42:58
Posso chiederti cosa intendevi fare con questa riga di codice e le altre sue simili?

For i = 0 to hour(10)

Per me non ha senso inserire hour(10) in un ciclo for...

hour(10) ti restituisce l'ora della decima barra cio? se la decima barra ha come orario 12:23:000 allora la funzione restiruisce 12..

cosa volevi fare esattamente?


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