OpenTimeTral
- Experten
- Valeriy Yastremskiy
- Version: 1.0
- Aktivierungen: 5
Zeitberater mit dynamischem trailingstop und trailingprofit.
Der opentimetral2 Advisor stellt die ausgewählten Ordertypen zu einem bestimmten Zeitpunkt aus und verwendet einen dynamischen trailingstop und ein trailingprofit für die erste Marktorder.
Einschränkungen bei der Auswahl von Ordertypen:
1. Es kann nur eine Art von Market order ausgewählt werden, entweder Buy oder Sell. Und mit der ausgewählten Marktorder können Sie nicht ausstehende Aufträge auswählen.
2. Pending Orders und Limit Orders können in beliebiger Kombination ausgewählt werden.
Nach der Umwandlung der ersten pending Orders oder Limit Orders in eine Market order werden die verbleibenden pending Orders und Limit Orders entfernt.
Für eine Marktorder wird ein dynamischer trailingstop verwendet. Stoploss modifiziert in einem Abstand nicht größer als der Wert Трейлингстоп vom aktuellen Angebotspreis, für Buy order, und vom Preis Ask, für Sell Orders und verringert Трейлингстоп bei der Annäherung an ТейкПрофит nach der Formel der linearen oder убыстряющегося auf Feedback-Möglichkeiten.
Für TakeProfit wird auch trailing auf einen Konstanten Wert verwendet. Wenn sich der aktuelle Preis dem TakeProfit-Niveau nähert, wird der Teikprofit um die Entfernung von TralingProfit geändert.
Wenn Trailingstop oder Trailingprofit nicht benötigt wird, wählen Sie die entsprechenden Werte 0.
Wenn die Näherung des Trailingstops nicht notwendig ist, wählen Sie den Wert Ksl = 0
Wenn Sie den Prots - Prozentsatz der freien Mittel verwenden möchten, setzen Sie den Lots-Wert auf null.
Einleitende Parameter
Lots=0.01; //working lot
Prots=0.01; // Percentage of available funds
slippage =2; //the level of acceptable slippage - requote in points
TakeProfit=500; //take profit in points
StopLoss=200; //stop loss in points
Open_Level_St=100; //distance level from the price for stop orders
Open_Level_Lim=200; //distance level from the price for limit orders
Tral_Stop=200; // Dist. persecutions StopLoss, Tral_Stop
Tral_Profit=100; // Dist. moving away TakeProfit, Tral_Profit
Ksl = 0.2; // StopLoss reduction coefficient, when approaching TakeProfit by the formula for Buy
// linear approximation SL = Bid - (Tral - 0.2(Bid - OrderOpenPrice()))
// dynamic approximation SL = Bid - (SL - Ksl (Bid - OrderOpenPrice()))
Open_Time=D'03.01.2019 13:00:00'; //the time of opening orders must be greater than the current time.
time_op = 600; // The lifetime of pending orders, in minutes, must be more than 11 minutes.
extern int Magic=5345; //the magic number of our orders
coming=linear; // the choice of a linear approximation or a dynamic Trailing stop
Open_Buy=false; //Yes/No working with buy orders
Open_Sell=false; //Yes/No working with sell orders
Open_Buy_Limit=false; //Yes/No working with buy limit orders
Open_Sell_Limit=false; //Yes/No working with sell limit orders
Open_Buy_Stop=True; //Yes/No working with buy stop orders
Open_Sell_Stop=True; //Yes/No working with sell stop orders