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
 Bollinger

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
Pingu Posted - 21 March 2005 : 09:06:40
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
1   L A T E S T    R E P L I E S    (Newest First)
SupportoTecnico Posted - 21 March 2005 : 14:58:27
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





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