Problema take profit ingresso
Forums › ProRealTime forum Italiano › Supporto ProBuilder › Problema take profit ingresso
- This topic has 4 replies, 2 voices, and was last updated 5 years ago by
robertogozzi.
-
-
06/12/2019 at 6:43 PM #1005021234567891011121314151617181920212223242526272829303132333435// Condizioni per entrare su posizioni longc1 = (close > open [120])c3 = (close[121] > open[240])c11 = (close > open)IF c1 AND c3 and c11 and timeEnterAfter THENBUY 1.6 CONTRACT AT MARKETp = 16ENDIF// Condizioni per entrare su posizioni shortc2 = (close < open [120])c4 = (close[121] < open[240])c22 = (close < open)IF c2 AND c4 and c22 and timeEnterAfter THENSELLSHORT 1.6 CONTRACT AT MARKETp = 16ENDIFc111 = (close > open)IF not ONMARKET and c111 AND timeEnterAfter THENBUY 1.6 CONTRACT AT MARKETp = 8.2ENDIF// Condizioni per entrare su posizioni shortc222 = (close < open)IF not ONMARKET and c222 AND timeEnterAfter THENSELLSHORT 1.6 CONTRACT AT MARKETp = 8.2ENDIF// Stop e targetSET TARGET pPROFIT p
Il programma usa SEMPRE come take profit 8.2 invece che 16 anche quando entra il contratto con take 16
06/12/2019 at 8:23 PM #100505Perché le righe 20 e 27 sono, una o l’altra, sempre vere quindi p=8.2, anche se prima gli era stato assegnato un valore diverso.
1 user thanked author for this post.
06/13/2019 at 5:04 PM #10056506/13/2019 at 5:26 PM #100567Comunque aggiungendo queste righe alla fine:
123456graph c11graph c22graph c111graph c222graph pgraph OnMarketpuoi verificare i valori delle variabili che t’interessano, candela per candela, nella finestra delle variabili di ProBackTest (è una finestra presente quando si usa GRAPH, se non lo usi la finestra non appare).
GRAPH e GRAPHONPRICE aiutano molto a trovare errori.
06/13/2019 at 5:31 PM #100570Usa sempre la condizione Not OnMarket per entrare in posizione, così sei certo che lo SL non ti cambia, altrimenti te lo può cambiare anche quando sei a mercato:
1234567891011121314151617181920212223242526272829303132333435363738394041// Condizioni per entrare su posizioni longc1 = (close > open [120])c3 = (close[121] > open[240])c11 = (close > open)IF c1 AND c3 and c11 AND Not OnMarket then//and timeEnterAfter THENBUY 1.6 CONTRACT AT MARKETp = 16ENDIF// Condizioni per entrare su posizioni shortc2 = (close < open [120])c4 = (close[121] < open[240])c22 = (close < open)IF c2 AND c4 and c22 AND Not OnMarket then //and timeEnterAfter THENSELLSHORT 1.6 CONTRACT AT MARKETp = 16ENDIFc111 = (close > open)IF not ONMARKET and c111 then//AND timeEnterAfter THENBUY 1.6 CONTRACT AT MARKETp = 8.2ENDIF// Condizioni per entrare su posizioni shortc222 = (close < open)IF not ONMARKET and c222 then//AND timeEnterAfter THENSELLSHORT 1.6 CONTRACT AT MARKETp = 8.2ENDIF// Stop e targetSET TARGET pPROFIT pgraph c11graph c22graph c111graph c222graph pgraph OnMarketho commentato una variabile inesistente.
Ti conviene mettere, come riga iniziale:
1DEFPARAM CumulateOrders = false -
AuthorPosts
Find exclusive trading pro-tools on