Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
EXCLUSIVE FORUM
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
someone can help me to do code or EA for trailing profit?
i think that it is very good idea
This is a simple 3 candles profit trailing (PT) code or more like a trailing stop. It is activated by GapPT=number of pips in profit. Attached is chart example of 3 candles method.
This is a simple 3 candles profit trailing (PT) code or more like a trailing stop. It is activated by GapPT=number of pips in profit. Attached is chart example of 3 candles method.
1. how to i exerts it on transactions that i am incipit in the manual way? or automiticly
2.i need that it is convene to act her just when he enter to the defeat
exenple: if trailing profit 20 just the order thesis -20 trailing profit beginner to work
(forgiveness on my english i hope that you are understands me)
having big potential in this method profit they maximums and defeat they minimum because the trailing profit
all of them losers because psychology of commerce and it will method exactly the opposite from psychology this
having big potential in this method profit they maximums and defeat they minimum because the trailing profit
all of them losers because psychology of commerce and it will method exactly the opposite from psychology this
I found almost all indicators very good, BUT indicator-- "arrow" in this forum is always above or below the bar. Many times, when i see the arrow, the best entry time has passed. It confuses me, what and when did the arrow appear?? So, i want to see the arrow display at the price positon when the arrow come out, better with the comment "XX:XX open price XXXX" on the chart left-up corner so that i may know what happened just now and deside the next step. i'm not a programmer, so i dont know how to write the code. Who here can help me finish it? thanks very much first.
I cant go on with programming until i found that %$§!!€-error.
The EA analyse the last 3 days. After that, it has to send two stop-orders. Both got initial stops. Later There is a trailing-stop running, when break-even is reached.
Now my problem is, that it doesn t send the long order?! No idea why not...
extern string Set1 = "Trade-Zeitraum";
extern int MaxOrderTime_h= 24; // Zeit in Stunden-Bars
extern string Set2 = "Stopp-Parameter";
extern double Trailing_stop = 40;
datetime TradeTime;
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
// Variablen für die letzten Hochs
double hoch1, hoch2, hoch3;
// Variablen für die letzten drei Tiefs
double tief1, tief2, tief3;
// Variablen für die Min/Max
double hoch, tief;
// Variable für Volatilität
double vola;
// Variablen für Kaufen/Verkaufen-Tag
int kauftag = 0;
int verkauftag = 0;
// Variablen für Stopp-Order-Preisbildung
double kauf_stopp_preis = 0;
double verkauf_stopp_preis = 0;
// Maß der durchschnittlichen Spanne
double spanne = 0;
// Variable für wahre Spanne
double wahre_spanne = 0;
// Variable für anfänglichen Stopp
double anfangs_stopp = 0;
// Variable zur Ermittlung der dreifachen Spanne
int go_bep_long = 0; //BEP in Long?
int go_bep_short = 0;//BEP in Short?
int bep_stopp = 0;
// Variable für nahen Stopp
double naher_stopp;
// Ordervariablen, Systemvariablen...
int ticket = 0;
int total = 0;
double lots = 0.1;
double take_profit = 100;
int magic_number1 = 1234;
int magic_number2 = 1235;
int cnt = 0;
//================================================== ==================
//Berechne das höchste Hoch und das tiefste Tief der letzten drei Tage
//und lege den Unterschied zwischen den beiden Punkten als Maß der
//Volatilität fest.
//================================================== ==================
//================================================== ===================
//Stelle fest, ob morgen ein Leichter kaufen- oder ein leichter Verkau-
//fen-Tag ist. Ist der heutige Schlusskurs gleich oder höher als der
//gestrige Schlusskurs, dann ist morgen ein leichter Verkaufen-Tag. Ist
//der heutige Schlusskurs tiefer als der gestrige, dann ist morgen ein
//leichter Kaufen-Tag
//---------------------------------------------------------------------
//Anmerkung:#
//Zeitreihe um eins verschoben!!!
//================================================== ===================
if(Close[1] >= Close[2]) verkauftag = 1;
if(Close[1] < Close[2]) kauftag = 1;
//================================================== ===================
//Ist heute ein leichter Kaufen-Tag, dann wird die Stopp-Order zum Kauf
//folgendermaßen berechnet: Teile das Maß der Volatilität durch zwei
//und addiere das Ergebnis zum Eröffnungskurs. Die Stopp-Order zum Ver-
//kauf an einem leichten Kaufen-Tag wird ermittelt, indem das Maß der
//Volatilität vom Eröffnungskurs abgezogen wird.
//================================================== ===================
if(verkauftag == 0 && kauftag == 1) // Kaufen-Tag?
{
kauf_stopp_preis = vola/2 + Open[0];
verkauf_stopp_preis = Open[0] - vola;
}
//================================================== ===================
//Ist heute ein leichter Verkaufen-Tag, dann wird die Stopp-Order zum
//Verkauf folgendermaßen berechnet: Teile das Maß der Volatilität durch
//zwei und ziehe das Ergebnis von Eröffnungskurs ab. Die Stopp-Order
//zum Kauf an einem leichten Verkaufen-Tag wird ermittelt, indem das
//Maß der Volatitilität zum Eröffnungskurs addiert wird.
//================================================== ===================
if(verkauftag == 1 && kauftag == 0) // Verkaufen-Tag?
{
verkauf_stopp_preis = Open[0] - vola/2;
kauf_stopp_preis = Open[0] + vola;
}
//================================================== ===================
//Anmerkung:
//Runden der Werte!
//================================================== ===================
verkauf_stopp_preis = MathRound(verkauf_stopp_preis);
kauf_stopp_preis = MathRound(kauf_stopp_preis);
//================================================== ===================
//Berechne die durchschnittliche wahre Spanne der letzten zehn Tage.
//================================================== ===================
wahre_spanne = iATR(NULL,0,10,0);
//================================================== ===================
//Setze die dreifache durchschnittliche Spanne als anfänglichen Stopp.
//================================================== ===================
anfangs_stopp = 3 * wahre_spanne;
//================================================== ===================
//Anmerkung:
//Runden des Wertes!
//================================================== ===================
anfangs_stopp = MathRound(anfangs_stopp);
//================================================== ===================
//Anmerkung:
//Wenn flat, dann Orders in den Markt stellen.
//Begrenzte Zeit für Order hinzugefügt
//================================================== ===================
// Überprüfung auf Signale und Handel
total = OrdersTotal(); //Anzahl momentaner Order
// Trade-Time-Management
TradeTime = iTime(NULL,PERIOD_D1,0);
//================================================== ===================
//Ist die Position um die dreifache durchschnittliche wahre Spanne in
//der Gewinnzone, ziehe den schützenden Stopp auf den Kostendeckungs-
//punkt nach.
//================================================== ===================
//Vergleiche den Trailing-Stop, den schützenden Stop und den Umkehrstop
//un wende immer den Stopp an, der momentan dem Kurs am nächsten liegt.
///================================================== ==================
i need to measure the height of a wave and make decision according to that.
For example ... I am looking at a 5 min chart. I see lots of up and down waves. I want to choose a wave which has a height of 40 pips or greater. How to write such a code?
My closing logic is: When Cross occurs it stimulates the Bar count which counts the bars since the cross. When that count reaches 2 (i.e. 2 bars after the cross) and if current bar is Bear it triggers a true return to the function.
Problem: Cross notifys ok but count doesn't occur and consequently never reaches "true" state.