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

 All Forums
 Help
 Aiuti, consigli, dubbi ...
 SAR
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

SupportoTecnico
Forum Admin

1261 Posts

Posted - 03 July 2003 :  18:20:10  Show Profile  Reply with Quote
Sempre utilizzando la parola chiave "Price" seguita da un'espressione il cui risultato ? il prezzo di entrata o di uscita a seconda della funzione in cui ci si trova.

Ad esempio la riga:

Price Close - 100

inserita nella funzione main di "Entra in acquisto" dice ad Insider 3000 di entrare long ad unprezzo pari alla chiusura meno 100 punti.

Quindi guardati l'esempio poco pi? in su dove si parlava degli stopo loss. Definisci in "Entra in acquisto" il prezzio di entrata. Memorizzalo poi in una variabile comune a tutti i moduli. Infine usa questa variabile nella funzione "Chiudi posizioni in acquisto" abbinata alla parola chiave "Price" per dire ad insider a che prezzo uscire.

Ovviamente il tutto ? subordinato ad una condizione di uscita. Che deve essere precisa.

Vediamo come potrebbe diventare l'esempio di qualche post fa :



Sezione "Opzioni Comuni" aggiungi le due dichiarazioni qui sotto:

Dim pdPriceLong As Numeric
Dim pdPriceShort As Numeric


Sezione "Entra in Acquisto":

Function Main()
If MoveAv(Close, 3, "S") > MoveAv(Close, 13, "S") Then
pdPriceLong = Close
Price Close
Return Sar(OptInc, OptMaxInc) < Low
Else
Return False
Endif
EndFunction


Sezione "Chiudi posizioni in acquisto":

Function Main()
Dim bRes As Boolean
Dim dExitPrice As Boolean

bRes = (MoveAv(Close, 3, "S") < MoveAv(Close, 13, "S"))
If bRes = False Then
dExitPrice = pdPriceLong - pdPriceLong * 0.04
bRes = (Close <= dExitPrice)
Endif
If bRes = False Then
dExitPrice = pdPriceShort - 100
bRes = (Close <= dExitPrice)
endif

Price dExitPrice
Return bRes

EndFunction


Sezione "Entra in Vendita":

Function Main()
If MoveAv(Close, 3, "S") < MoveAv(Close, 13, "S") Then
pdPriceShort = Close
Price Close
Return Sar(OptInc, OptMaxInc) > High
Else
Return False
Endif
EndFunction


Sezione "Chiudi posizioni in vendita":

Function Main()
Dim bRes As Boolean
Dim dExitPrice As Boolean

bRes = (MoveAv(Close, 3, "S") > MoveAv(Close, 13, "S"))
If bRes = False Then
dExitPrice = pdPriceShort + pdPriceShort * 0.04
bRes = (Close >= dExitPrice)
Endif
If bRes = False Then
dExitPrice = pdPriceShort + 100
bRes = (Close >= dExitPrice)
endif

Price dExitPrice
Return bRes

EndFunction








Go to Top of Page

luca71-4
Nuovo Utente

34 Posts

Posted - 03 July 2003 :  23:42:20  Show Profile  Reply with Quote
Spiacente ma non mia prende la stringa
dExitPrice = pdPriceShort + 100
anche la lostop long inteso.

Go to Top of Page

SupportoTecnico
Forum Admin

1261 Posts

Posted - 04 July 2003 :  02:07:03  Show Profile  Reply with Quote
Si ? vero. Era sbagliato il tipo della variabile dichiarata (era stata dichiarata Boolean anzich? Numeric). Ma per questi errori non dovresti avere problemi a cavartela da solo.

Comunque:



Sezione "Opzioni Comuni" aggiungi le due dichiarazioni qui sotto:

Dim pdPriceLong As Numeric
Dim pdPriceShort As Numeric


Sezione "Entra in Acquisto":

Function Main()
If MoveAv(Close, 3, "S") > MoveAv(Close, 13, "S") Then
pdPriceLong = Close
Price Close
Return Sar(OptInc, OptMaxInc) < Low
Else
Return False
Endif
EndFunction


Sezione "Chiudi posizioni in acquisto":

Function Main()
Dim bRes As Boolean
Dim dExitPrice As Numeric

bRes = (MoveAv(Close, 3, "S") < MoveAv(Close, 13, "S"))
If bRes = False Then
dExitPrice = pdPriceLong - pdPriceLong * 0.04
bRes = (Close <= dExitPrice)
Endif
If bRes = False Then
dExitPrice = pdPriceShort - 100
bRes = (Close <= dExitPrice)
endif

Price dExitPrice
Return bRes

EndFunction


Sezione "Entra in Vendita":

Function Main()
If MoveAv(Close, 3, "S") < MoveAv(Close, 13, "S") Then
pdPriceShort = Close
Price Close
Return Sar(OptInc, OptMaxInc) > High
Else
Return False
Endif
EndFunction


Sezione "Chiudi posizioni in vendita":

Function Main()
Dim bRes As Boolean
Dim dExitPrice As Numeric

bRes = (MoveAv(Close, 3, "S") > MoveAv(Close, 13, "S"))
If bRes = False Then
dExitPrice = pdPriceShort + pdPriceShort * 0.04
bRes = (Close >= dExitPrice)
Endif
If bRes = False Then
dExitPrice = pdPriceShort + 100
bRes = (Close >= dExitPrice)
endif

Price dExitPrice
Return bRes

EndFunction




Go to Top of Page

luca71-4
Nuovo Utente

34 Posts

Posted - 04 July 2003 :  13:36:55  Show Profile  Reply with Quote
No peccato cosi non funziona nulla calcola il risultato di poche operazioni del resto indica il prezzo di entrata e 0 prezzo uscita non capisco.

Go to Top of Page

SupportoTecnico
Forum Admin

1261 Posts

Posted - 04 July 2003 :  15:06:25  Show Profile  Reply with Quote
Abbiamo aggiunto questa riga:

dExitPrice = Close

alle funzione di "Chiudi acquisto e chiusi vendita" e corretto il nome di una variabile.

Quindi copia e incolla il codice qui sotto nel tuo trading system.

La riga aggiunta (dExitPrice = Close) ? a tua discrezione, nel senso che noi l'abbiamo eguagliata a Close ma tu puoi decidere cosa ? meglio per te.




Sezione "Opzioni Comuni" aggiungi le due dichiarazioni qui sotto:

Dim pdPriceLong As Numeric
Dim pdPriceShort As Numeric



Sezione "Entra in Acquisto":

Function Main()
If MoveAv(Close, 3, "S") > MoveAv(Close, 13, "S") Then
pdPriceLong = Close
Price Close
Return Sar(OptInc, OptMaxInc) < Low
Else
Return False
Endif
EndFunction


Sezione "Chiudi posizioni in acquisto":

Function Main()
Dim bRes As Boolean
Dim dExitPrice As Numeric

bRes = (MoveAv(Close, 3, "S") < MoveAv(Close, 13, "S"))
dExitPrice = Close
If bRes = False Then
dExitPrice = pdPriceLong - pdPriceLong * 0.04
bRes = (Close <= dExitPrice)
Endif
If bRes = False Then
dExitPrice = pdPriceLong - 100
bRes = (Close <= dExitPrice)
endif

Price dExitPrice
Return bRes

EndFunction


Sezione "Entra in Vendita":

Function Main()
If MoveAv(Close, 3, "S") < MoveAv(Close, 13, "S") Then
pdPriceShort = Close
Price Close
Return Sar(OptInc, OptMaxInc) > High
Else
Return False
Endif
EndFunction


Sezione "Chiudi posizioni in vendita":

Function Main()
Dim bRes As Boolean
Dim dExitPrice As Numeric

bRes = (MoveAv(Close, 3, "S") > MoveAv(Close, 13, "S"))
dExitPrice = Close
If bRes = False Then
dExitPrice = pdPriceShort + pdPriceShort * 0.04
bRes = (Close >= dExitPrice)
Endif
If bRes = False Then
dExitPrice = pdPriceShort + 100
bRes = (Close >= dExitPrice)
endif

Price dExitPrice
Return bRes

EndFunction


Go to Top of Page

luca71-4
Nuovo Utente

34 Posts

Posted - 04 July 2003 :  16:37:27  Show Profile  Reply with Quote
Scusami ancora ma non rieco a risolvere il problema dello stop
E in oltre come ti dicevo nella mail il SAR funziona solo da conferma ma non da stop lo stop viene dato solo dalle mm

Go to Top of Page

luca71-4
Nuovo Utente

34 Posts

Posted - 22 July 2003 :  21:10:22  Show Profile  Reply with Quote
Non capisco con lo stop % continua a darmi gli stessi risultati a qualunque livello lo taro 1% 10% ? uguale , sembra che esca sempre al prezzo di chiusura io vorrei uscisse al prezzo indicato o nel caso non sia possibile xche l'apertura ? gia sotto tale livello vorrei uscisse all'apertura !!!!!
AIUTOooooo

Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 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