Expert Advisors: Return Strategy

 

Return Strategy:

Er arbeitet mit Pending-Orders: Buy Limit und Sell Limit. Raster von Pending-Orders.

Return Strategy

Autor: Vladimir Karputov

 
Alexander Kamyshanov:
Hallo, wie man anstelle von Pending Order Lebensdauer seine ständige Bewegung hinter dem Preis durch eine bestimmte Anzahl von Pips aus dem Preis einmal in Minuten zu machen?

Erstens: Sie müssen den Text der Frage zumindest durch Word laufen - diese Aktion wird den Text zu korrigieren und Satzzeichen an den richtigen Stellen hinzufügen ...

 

Version 1.001 - Funktion LotsOrRisk korrigiert

Sie können von Return Strategy herunterladen :

 

Hallo Vladimir,
Danke für die Korrektur.

Können wir sagen, dass die Funktion des Gesamtgewinns (in Punkten) nicht die gleiche Funktionalität hat wie der Zielgewinn oder der Mindestgewinn?

 
Edviao:

Hallo Vladimir,
Danke für die Korrektur.

Können wir sagen, dass die Funktion des Gesamtgewinns (in Punkten) nicht die gleiche Funktionalität hat wie der Zielgewinn oder der Mindestgewinn?

Die Frage ist nicht klar: Es gibt keinen"Zielgewinn" und"Mindestgewinn" im EA.


So suchen Sie nach Antworten: Nehmen Sie den Eingabeparameter 'Gesamtgewinn (in Pips)' - schauen Sie , welche Variable dafür verantwortlich ist:

input ushort   InpTotalProfit    = 100;      // Gesamtgewinn (in Pips)


... Suchen Sie nach dem ersten Vorkommen von 'InpTotalProfit'.

   ExtTotalProfit    = InpTotalProfit  * m_adjusted_point;


... suchen Sie nun nach dem ersten Vorkommen von'ExtTotalProfit' ...

//---
   if(CalculateTotalProfit()>=ExtTotalProfit)
     {
      bln_close_all=true;
      return;
     }


... bleibt noch, die Funktion 'CalculateTotalProfit()' zu untersuchen ...

 
Danke für die Hausaufgaben, die ich am Wochenende erledigen werde, Vladimir!
 

Guten Tag!

Was kann der Grund für die Meldung im Protokoll während des Testens sein? Die Einstellungen des Expert Advisors werden standardmäßig übernommen.

2021.10.30 10:20:44.968 2021.01.11 10:57:26   Code of request result: 10022
2021.10.30 10:20:44.968 2021.01.11 10:57:26   code of request result as a string: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Deal ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Order ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Volume of deal or order: 0.00
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Price, confirmed by broker: 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current bid price: 1.21783 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current ask price: 1.21795 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Broker comment: 
2021.10.30 10:20:44.968 2021.01.11 10:57:26   CTrade::OrderOpen: Invalid expiration type
2021.10.30 10:20:44.968 2021.01.11 10:57:26   #3  Buy Limit (0) -> false. Result Retcode: 10022, description of result: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Code of request result: 10022
2021.10.30 10:20:44.968 2021.01.11 10:57:26   code of request result as a string: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Deal ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Order ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Volume of deal or order: 0.00
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Price, confirmed by broker: 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current bid price: 1.21782 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current ask price: 1.21794 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Broker comment: 
2021.10.30 10:20:44.968 2021.01.11 10:57:26   CTrade::OrderOpen: Invalid expiration type
2021.10.30 10:20:44.968 2021.01.11 10:57:26   #3  Buy Limit (1) -> false. Result Retcode: 10022, description of result: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Code of request result: 10022
2021.10.30 10:20:44.968 2021.01.11 10:57:26   code of request result as a string: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Deal ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Order ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Volume of deal or order: 0.00
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Price, confirmed by broker: 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current bid price: 1.21782 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current ask price: 1.21794 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Broker comment: 
2021.10.30 10:20:44.968 2021.01.11 10:57:26   CTrade::OrderOpen: Invalid expiration type
2021.10.30 10:20:44.968 2021.01.11 10:57:26   #3  Buy Limit (2) -> false. Result Retcode: 10022, description of result: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Code of request result: 10022
2021.10.30 10:20:44.968 2021.01.11 10:57:26   code of request result as a string: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Deal ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Order ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Volume of deal or order: 0.00
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Price, confirmed by broker: 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current bid price: 1.21782 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current ask price: 1.21794 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Broker comment: 
2021.10.30 10:20:44.968 2021.01.11 10:57:26   CTrade::OrderOpen: Invalid expiration type
2021.10.30 10:20:44.968 2021.01.11 10:57:26   #3  Buy Limit (3) -> false. Result Retcode: 10022, description of result: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Code of request result: 10022
2021.10.30 10:20:44.968 2021.01.11 10:57:26   code of request result as a string: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Deal ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Order ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Volume of deal or order: 0.00
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Price, confirmed by broker: 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current bid price: 1.21782 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current ask price: 1.21794 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Broker comment: 
2021.10.30 10:20:44.968 2021.01.11 10:57:26   CTrade::OrderOpen: Invalid expiration type
2021.10.30 10:20:44.968 2021.01.11 10:57:26   #3  Sell Limit (0) -> false. Result Retcode: 10022, description of result: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Code of request result: 10022
2021.10.30 10:20:44.968 2021.01.11 10:57:26   code of request result as a string: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Deal ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Order ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Volume of deal or order: 0.00
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Price, confirmed by broker: 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current bid price: 1.21782 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current ask price: 1.21794 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Broker comment: 
2021.10.30 10:20:44.968 2021.01.11 10:57:26   CTrade::OrderOpen: Invalid expiration type
2021.10.30 10:20:44.968 2021.01.11 10:57:26   #3  Sell Limit (1) -> false. Result Retcode: 10022, description of result: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Code of request result: 10022
2021.10.30 10:20:44.968 2021.01.11 10:57:26   code of request result as a string: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Deal ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Order ticket: 0
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Volume of deal or order: 0.00
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Price, confirmed by broker: 0.00000
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Current bid price: 1.21782 (the requote): 0.00000
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Current ask price: 1.21794 (the requote): 0.00000
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Broker comment: 
2021.10.30 10:20:44.969 2021.01.11 10:57:26   CTrade::OrderOpen: Invalid expiration type
2021.10.30 10:20:44.969 2021.01.11 10:57:26   #3  Sell Limit (2) -> false. Result Retcode: 10022, description of result: invalid expiration
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Code of request result: 10022
2021.10.30 10:20:44.969 2021.01.11 10:57:26   code of request result as a string: invalid expiration
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Deal ticket: 0
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Order ticket: 0
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Volume of deal or order: 0.00
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Price, confirmed by broker: 0.00000
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Current bid price: 1.21782 (the requote): 0.00000
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Current ask price: 1.21794 (the requote): 0.00000
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Broker comment: 
2021.10.30 10:20:44.969 2021.01.11 10:57:26   CTrade::OrderOpen: Invalid expiration type
2021.10.30 10:20:44.969 2021.01.11 10:57:26   #3  Sell Limit (3) -> false. Result Retcode: 10022, description of result: invalid expiration
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Code of request result: 10022
2021.10.30 10:20:44.969 2021.01.11 10:57:26   code of request result as a string: invalid expiration
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Deal ticket: 0
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Order ticket: 0
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Volume of deal or order: 0.00
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Price, confirmed by broker: 0.00000
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Current bid price: 1.21782 (the requote): 0.00000
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Current ask price: 1.21794 (the requote): 0.00000
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Broker comment: 

Mit freundlichen Grüßen, Vladimir.

 
Zeigt an, dass'ORDER_TIME_SPECIFIED' nicht unterstützt wird.
 
Vladimir Karputov "ORDER_TIME_SPECIFIED" nicht unterstützt wird.

Es ist mir peinlich zu fragen - nicht unterstützt von wem oder von was?

Mit freundlichen Grüßen, Vladimir.

 
MrBrooklin #:

Es ist mir peinlich zu fragen - nicht unterstützt von wem oder was?

Bei allem Respekt, Vladimir.

Der Handelsserver. Sind Sie wahrscheinlich nicht auf Forex testen?

 
Vladimir Karputov #:

Ein Handelsserver. Sind Sie wahrscheinlich nicht auf Forex testen?

Ich teste mit dem Terminal meines Forex-Händlers. Ich werde versuchen, den Build zu aktualisieren.

Mit freundlichen Grüßen, Vladimir.