[Qualsiasi domanda da principiante, per non ingombrare il forum. Professionisti, non passate oltre. Da nessuna parte senza di te - 4. - pagina 121
Ti stai perdendo delle opportunità di trading:
- App di trading gratuite
- Oltre 8.000 segnali per il copy trading
- Notizie economiche per esplorare i mercati finanziari
Registrazione
Accedi
Accetti la politica del sito e le condizioni d’uso
Se non hai un account, registrati
dove aggiungere il trailing stop e l'uscita di pareggio? e non aumenta il lotto quando si aumenta il deposito
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int Buy (int StopLoss = 0, int TakeProfit = 0, double Lot = 0)
{
int Ticket = 0;
doppio SL = 0;
doppio TP = 0;
doppio VolumeLot = 0;
RefreshRates();
se (StopLoss != 0)
SL = NormalizeDouble(Bid-StopLoss*Point, Digits);
se (TakeProfit != 0)
TP = NormalizeDouble(Ask+TakeProfit*Point, Digits);
se (Lotto == 0)
VolumeLot = GetLot ();
else
VolumeLot = Lotto;
Ticket = OrderSend(Symbol(), OP_BUY, VolumeLot, NormalizeDouble(Ask, Digits), 20, SL, TP, NULL, AccountNumber(), 0, Green);
se (Biglietto == -1)
{
return (GetLastError ();
}
else
{
ritorno (biglietto);
}
}
int Vendere (int StopLoss = 0, int TakeProfit = 0, double Lot = 0)
{
int Ticket = 0;
doppio SL = 0;
doppio TP = 0;
doppio VolumeLot = 0;
RefreshRates();
se (StopLoss != 0)
SL = NormalizeDouble(Ask+StopLoss*Point, Digits);
se (TakeProfit != 0)
TP = NormalizeDouble(Bid-TakeProfit*Point, Digits);
se (Lotto == 0)
VolumeLot = GetLot ();
else
VolumeLot = Lotto;
Ticket = OrderSend(Symbol(), OP_SELL, VolumeLot, NormalizeDouble(Bid, Digits), 20, SL, TP, NULL, AccountNumber(), 0, Red);
se (Biglietto == -1)
return (GetLastError ();
else
ritorno (biglietto);
}
doppio GetLot ()
{
lotto int;
se (AccountBalance()>=300) lotto=0,01;
se (AccountBalance()>=500) lotto=0,02;
se (AccountBalance()>=800) lotto=0,03;
ritorno (lotto);
}
dove aggiungere il trailing stop e l'uscita di pareggio? e non aumenta il lotto quando si aumenta il deposito
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Nel consigliere
funzione lotto increase...... è probabilmente meglio cambiare
esempio:
Guarda la media mobile.mq4
Puoi per favore dirmi come usare le bande di bollinger per il momentum e non per il prezzo? Ho provato così:
BandOPeriodT - variabile esterna, periodo delle bande di bollinger.
MomentumPeriodT - periodo di momentum, rispettivamente.
BandOBottom=iBands (NULL,0,BandOPeriodT,1,0,iMomentum(NULL,0,MomentumPeriodT,PRICE_OPEN,0),MODE_LOWER,0);
e anche come questo:
MomO=iMomentum(NULL,0,MomentumPeriodT,PRICE_OPEN,0); - variabile interna che restituisce il valore
BandOBottom=iBands(NULL,0,BandOPeriodT,1,0,MomO,MODE_LOWER,0); - la variabile dovrebbe restituire il valore della linea di Bollinger inferiore per il valore precedente della variabile.
Inoltre, ho ragione nel supporre che MODE_LOWER significa che ottengo il valore di BOLLINGER BOLLINGER in una variabile? Se no, come posso ottenerlo esattamente?
Puoi per favore dirmi come usare le bande di bollinger per il momentum e non per il prezzo? Ho provato così:
BandOPeriodT - variabile esterna, periodo delle bande di bollinger.
MomentumPeriodT - periodo di momentum, rispettivamente.
BandOBottom=iBands (NULL,0,BandOPeriodT,1,0,iMomentum(NULL,0,MomentumPeriodT,PRICE_OPEN,0),MODE_LOWER,0);
e anche come questo:
MomO=iMomentum(NULL,0,MomentumPeriodT,PRICE_OPEN,0); - variabile interna che restituisce il valore
BandOBottom=iBands(NULL,0,BandOPeriodT,1,0, MomO,MODE_LOWER,0); - la variabile dovrebbe restituire il valore della linea di Bollinger inferiore per il valore precedente della variabile.
Inoltre, ho ragione a pensare che MODE_LOWER significa che ottengo il valore di Bollinger BOW in una variabile? Se no, come posso ottenerlo esattamente?
Vedi trailer - ci Bande per RSI - fai lo stesso per Momentum.
Descrizione - nel log - vedi codice all'inizio.
Ciao, per favore aiutatemi! Voglio provare l'indicatore PVT:
Potete dirmi per favore cosa manca?
Dice: 2012.05.14 19:34:46 Impossibile aprire il file 'C:\Program Files\Alpari NZ MT4\experts\indicators\PVT.ex4' su EURUSD,H4
Grazie!
dove aggiungere il trailing stop e l'uscita di pareggio? e non aumenta il lotto quando si aumenta il deposito
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int Buy (int StopLoss = 0, int TakeProfit = 0, double Lot = 0)
{
int Ticket = 0;
doppio SL = 0;
doppio TP = 0;
doppio VolumeLot = 0;
RefreshRates();
se (StopLoss != 0)
SL = NormalizeDouble(Bid-StopLoss*Point, Digits);
se (TakeProfit != 0)
TP = NormalizeDouble(Ask+TakeProfit*Point, Digits);
se (Lotto == 0)
VolumeLot = GetLot ();
else
VolumeLot = Lotto;
Ticket = OrderSend(Symbol(), OP_BUY, VolumeLot, NormalizeDouble(Ask, Digits), 20, SL, TP, NULL, AccountNumber(), 0, Green);
se (Biglietto == -1)
{
return (GetLastError ();
}
else
{
ritorno (biglietto);
}
}
int Vendere (int StopLoss = 0, int TakeProfit = 0, double Lot = 0)
{
int Ticket = 0;
doppio SL = 0;
doppio TP = 0;
doppio VolumeLot = 0;
RefreshRates();
se (StopLoss != 0)
SL = NormalizeDouble(Ask+StopLoss*Point, Digits);
se (TakeProfit != 0)
TP = NormalizeDouble(Bid-TakeProfit*Point, Digits);
se (Lotto == 0)
VolumeLot = GetLot ();
else
VolumeLot = Lotto;
Ticket = OrderSend(Symbol(), OP_SELL, VolumeLot, NormalizeDouble(Bid, Digits), 20, SL, TP, NULL, AccountNumber(), 0, Red);
se (Biglietto == -1)
return (GetLastError ();
else
ritorno (biglietto);
}
doppio GetLot ()
{
lotto int;
se (AccountBalance()>=300) lotto=0,01;
se (AccountBalance()>=500) lotto=0,02;
se (AccountBalance()>=800) lotto=0,03;
ritorno (lotto);
}
per il simbolo a cui è collegato l'Expert Advisor. Supponiamo anche che il valore del trailing stop
in pip sia contenuto nella variabile TrailingStop.
La funzione OrderProfit() restituisce il profitto per l'ordine selezionato utilizzando la funzione OrderSelect().
Supponiamo di voler calcolare il profitto che abbiamo ottenuto dalle posizioni chiuse.
E il codice completo che calcola il profitto per tutte le posizioni chiuse,
che sono aperte oggi, sarà:
E non aumenta la dimensione del lotto quando si aumenta il deposito
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Forse c'è qualcos'altro che manca nel codice:
L'ordine deve essere preselezionato usando OrderSelect().
Ciao, per favore aiutatemi! Voglio provare l'indicatore PVT:
Potete dirmi per favore cosa manca?
Dice: 2012.05.14 19:34:46 Impossibile aprire il file 'C:\Program Files\Alpari NZ MT4\experts\indicators\PVT.ex4' su EURUSD,H4
Grazie!
Manca l'indicatore PVT stesso (sei sicuro di averne uno?).
Certo che ce l'ho ed è compilato e eh4. E mettetelo anche sul grafico. Forse ho scritto qualcosa di sbagliato? Grazie!