Scusami gentilmente potresti modificarmi il codice (che fa riferimento ad un mio indicatore) con l’istruzione “Set Stop Price DSPIU1″ ?
e se possibile un’alternativa conuscita al tocco del prezzo DSPIU1 senza aspettare la chiusura della candela.
allego il codice
Grazie mille
DEFPARAM CumulateOrders = TRUE
// Condizioni per entrare su posizioni long
DS1M, ignored, DS2M, ignored, ignored, ignored, ignored, ignored, ignored = CALL "DS-NQ"[0, 0, 0, 255, 105, 89, 205, 0, 0, 0, 0, 0]
DS1 = (low CROSSES UNDER DS1M)
DS2 = (low CROSSES UNDER DS2M)
IF DS2 THEN
BUY 1 SHARES AT MARKET
ENDIF
IF DS1 AND NOT DS2 AND NOT ONMARKET THEN
BUY 1 SHARES AT MARKET
ENDIF
// Condizioni per uscire da posizioni long
ignored, DSPIU1, ignored, ignored, ignored, ignored, ignored, ignored, ignored = CALL "DS-NQ"[0, 0, 0, 255, 105, 89, 205, 0, 0, 0, 0, 0]
c2 = (high CROSSES OVER DSPIU1)
IF LONGONMARKET and c2 THEN
SELL AT MARKET
ENDIF