Insider 3000 - Forums
Insider 3000 - Forums
Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Problemi con "Insider 3000 versione 3"
 Problemi col linguaggio di programmazione
 Oscillatore
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

alberto.tortella
Nuovo Utente

23 Posts

Posted - 20 March 2005 :  14:58:51  Show Profile  Reply with Quote
Sto cercando di costruire un oscillatore II% (intraday intensity) che viene calcolato con questa formula:


Function Main()
Dim II% As Numeric
Dim i As Numeric

II% = ((2 * Close - High - Low) / (High - Low) * Volume) - (Volume * 100)

for (i = 0;-1; -21) (vorrei impostare un ciclo ?for? per ?i? che va da ?1 a ?21 con passo ?1 ma non riesco a trovare la sintassi corretta).

II% = II% + ((2 * Close(i) - High(i) - Low(i)) / (High(i) - Low(i)) * Volume(i)) - (Volume(i) * 100)

Return II%
Endfunction


Potete aiutarmi?
Grazie

SupportoTecnico
Forum Admin

1261 Posts

Posted - 20 March 2005 :  21:07:04  Show Profile  Reply with Quote
Ecco la sintassi giusta. E' necessario togliere anche il "%" da II% perch? ? un carattere non accettato. Inoltre la prima riga la puoi includere nel ciclo facendolo andare da -21 a 0.


Function Main()
Dim II As Numeric
Dim i As Numeric

for i = - 21 to 0
II = II + ((2 * Close(i) - High(i) - Low(i)) / (High(i) - Low(i)) * Volume(i)) - (Volume(i) * 100)
next i

Return II
Endfunction


Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Insider 3000 - Forums © Copyright 2003-2016 Tradersoft s.r.l. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07