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
 Bollinger
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Pingu
Nuovo Utente

29 Posts

Posted - 21 March 2005 :  09:06:40  Show Profile  Reply with Quote
Con il codice seguente (entrate e uscite solo long) vorrei ottenere un segnale di uscita sia quando la barra attraversa dall'alto la banda di B. superiore, ma anche, come stop loss, quando il prezzo scende sotto il minimo - Low(-1) - della prima barra di setup. Il problema e' che il codice cosi' com'e' non segnala questa seconda uscita (stop loss): mi potete aiutare a capire dov'e' l'errore?
Grazie!



Dim pbLowSignal as Numeric
Option Opt1(5, 30, 1)
Option Opt2(5, 30, 1)


Function main()

If (Low( - 1) < value(bollinger(Close, Opt1, "D", 2), - 1)) Then
pbLowSignal = Low(-1)
Return (High > High( - 1)) and (High > Bollinger(Close, Opt1, "D", 2))
Endif

Endfunction


Function main()

If (High( - 1) > value(bollinger(Close, Opt2, "U", 2), - 1)) Then
Return (High < High( - 1)) and (High < Bollinger(Close, Opt2, "U", 2)) Or Close < pbLowSignal
Endif

Endfunction

SupportoTecnico
Forum Admin

1261 Posts

Posted - 21 March 2005 :  14:58:27  Show Profile  Reply with Quote
Probabilmente mancano solo delle parentesi:

Function main()

If (High( - 1) > value(bollinger(Close, Opt2, "U", 2), - 1)) Then
Return ((High < High( - 1)) and (High < Bollinger(Close, Opt2, "U", 2))) Or (Close < pbLowSignal)
Endif

EndFunction


Inoltre scrivi "Entra in aquisto" in questo modo:


Function main()

If (Low( - 1) < value(bollinger(Close, Opt1, "D", 2), - 1)) Then
if (High > High( - 1)) and (High > Bollinger(Close, Opt1, "D", 2)) then
pbLowSignal = Low(-1)
Return True
Endif
Endif

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