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
 problemi con il linguaggio di programmazione

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
cicciomarmitta Posted - 14 December 2004 : 11:15:46
salve
ho scritto un piccolissimo programma per evidenziare tramite la finestra trova le barre con determinate caratteristiche
per esempio

function main()
dim a, b, c as Boolean
a = (close > open)
b = (volume > volume( - 1) * 1.5)
c = a and b
return c
endfunction

ma scrivendo cosi vi esce scritto che tipo non corretto AND b
a me sembra che sia corretto

invece cosi non da errori
function main()
dim a, b, c as Boolean
a = (volume > volume( - 1) * 1.5) and (close > open)
return a
endfunction

ma io volevo scrivere altre condizioni da mettere tutte in and o or
e facendo cosi mi viene una riga lunghissima devo per forza fare cosi?
c? qualcosa di sbagliato nel primo esempio?

Ciao




1   L A T E S T    R E P L I E S    (Newest First)
SupportoTecnico Posted - 14 December 2004 : 12:21:05

Il problema sta nella dichiarazione delle variabili.
Scrivendo cos?:

dim a, b, c as Boolean

a e b sono di tipo variant e non boolean mentre in un'eguaglianza ? richiesto che i partecipanti siano dello stesso tipo.

La soluzione ? scivere in questo modo:

dim a as Boolean
dim b as Boolean
dim c as Boolean

e quindi:

function main()
dim a as Boolean
dim b as Boolean
dim c as Boolean

a = (close > open)
b = (volume > (volume( - 1) * 1.5))
c = a and b
return c
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