50 points system, no indikator needed

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #246784 quote
    f1_maik
    Participant
    Junior

    Hello dear people, maybe someone can help me, I am not a light in programming, but here is an approach that differs from the usual indicator-driven approach.  In some of the forums I frequent, the following approach is used for indices, especially the Dax40.

    the system
    When the market opens at 08.00 or even 09.00, any trend direction is assumed, purely arbitrary, let’s say long.
    For the first trade of the day, the SL and TP are set at 50 points.
    If the TP is reached in the 1st trade, the system will not execute any further trades on this day.
    If the SL is reached in the 1st trade, a 2nd trade in the opposite direction (short) is started immediately. SL 50 points, TP 100 points.
    If the TP is reached in the 2nd trade, the system will not execute any further trades on that day.
    If the SL is reached in the 2nd trade, a 3rd and last trade started on this day, again in the opposite direction, i.e. in this case again long. SL 50 points, TP 150 points.
    Regardless of whether the SL or TP is reached in the 3rd trade, the system is terminated on this day.

    The same game is then played the next day with the change that the arbitrary trade direction is the opposite trade direction of the previous day. The 1st trade would therefore be short. The 2nd trade would be long, the 3rd trade would be short again.

    On the day after next we start again in the opposite direction of the previous day, with long, on the 4th day then with short, on the 5th day with long and so on.

    Trading only takes place Monday to Friday without the addition of Sunday. The overnight risk is initially neglected. Cumulateorders = false. The system only starts once a day and is limited to a maximum of 3 trades and thus 150 points loss.

    Can this be programmed with ProRealCode? The main difficulty I see is the exact change after reaching the respective SL.

    Here again the SL and TP
    sl1 = 50
    tp1 = 50

    sl2 = 50
    tp2 = 100

    sl3 = 50
    tp3 = 150

     

    When asked why points, I say we can also use percentages. I hold 50 points in the Dax40 at 20,000 points in dax a few days ago, we would be at 0.25%. However, people there have got hooked on the 50 points.

    #246800 quote
    Iván González
    Moderator
    Master

    Hi! Here you have an example

    defparam flatafter = 210000
    defparam flatbefore = 080000
    
    once dirini=1
    once e=1
    
    sl=50
    tp1=50
    tp2=100
    tp3=150
    
    
    if intradaybarindex=0 then
    dirini=-dirini
    numtrades=0
    e=1
    endif
    
    if longonmarket then
    buyprice=tradeprice
    stoploss=tradeprice-sl*pipsize
    takeprofit1=tradeprice+tp1*pipsize
    takeprofit2=tradeprice+tp2*pipsize
    takeprofit3=tradeprice+tp3*pipsize
    elsif shortonmarket then
    buyprice=tradeprice
    stoploss=tradeprice+sl*pipsize
    takeprofit1=tradeprice-tp1*pipsize
    takeprofit2=tradeprice-tp2*pipsize
    takeprofit3=tradeprice-tp3*pipsize
    endif
    
    if not onmarket and dirini=1 and e=1 then
    buy 1 contract at market
    elsif not onmarket and dirini=-1 and e=1 then
    sellshort 1 contract at market
    endif
    
    if longonmarket and e<=3 then
    sellshort 1 contract at stoploss stop
    elsif shortonmarket and e<=3 then
    buy 1 contract at stoploss stop
    endif
    
    if longonmarket and (shortonmarket[1] or not onmarket[1]) then
    e=e+1
    elsif shortonmarket and (longonmarket[1] or not onmarket[1] ) then
    e=e+1
    endif
    
    if e<=2 then
    takeprofit=takeprofit1
    set target pprofit tp1
    elsif e=3 then
    takeprofit=takeprofit2
    set target pprofit tp2
    elsif e=4 then
    takeprofit=takeprofit3
    set target pprofit tp3
    set stop ploss sl
    endif
    
    graphonprice buyprice coloured("blue")
    graphonprice stoploss coloured("red")
    graphonprice takeprofit coloured("green")
    f1_maik thanked this post
    #246824 quote
    f1_maik
    Participant
    Junior

    Hello Ivan. Thank you! The help/translation came with blue light, “nee-naw, woop-woop”. Thank you very much.

    I’ll take a look at it over the next 1.2 days to understand it. I’ll be back.

    #246971 quote
    f1_maik
    Participant
    Junior

    Hello Ivan.

    Thanks again for programming the system. I was able to take a look at it today and your program already does a lot of things right!
    For example, if the 1st trade ends with a loss, the 2nd trade is started in the opposite direction, it works perfectly!
    Also correct is: SL always 50 points and TP staggered TP1 50 points, TP2 points, TP 3 points, works, great!

    But now to the problem. See screenshot 1
    Chart Dax40 M1,  Day 10.04.2025 start time 09.00 am
    The 1st trade goes into the TP. Fits, works!
    But (!!) then the system opens further trades on 10.04.! That’s not supposed to happen! It’s only about 50 points. If a profit of 50 points is made on a day (maybe with the 1st trade), then no more trades are made on that day!

    If 1.trade goes into winnings, then no more trades on that day. You have your 50 points
    If 1st trade goes into loss, then and only then, will a 2nd trade be started on that day, in the opposite direction of course. The 2nd trade has TP 100, of course.

    If 2nd trade goes into profit, that’s it for the day, then no more trades on that day! You have your 50 points (1×50 loss and 1×100 profit).
    If 2nd trade goes into loss, then and only then, is a 3rd trade started. Again in the opposite direction, of course. The 2nd trade has TP 150, of course.

    If 3rd trade TP is in profit or in loss, it is no longer traded on that day. No (!) 4th trade is started, never! Either you have 3x 50 points loss or summary 1x 50 profit .

     

    But and now here is the problem. On 10.04. he starts more than 3 trades and also or although already the 1st trade ends with 50 points in profit. See screenshot attached.

     

    Can you change that the system
    a. stops after 50 points profit on a day (will reached with 1 oder 2 trades) or
    b. in case 2 consecutive losses on the same day the system starts only a 3rd, a last trade on that day.

     

    On the next day the system should then start from the beginning with the 1st trade, of course.

    Can you do that?

    lg and gl

    Screenshot_1-1.png Screenshot_1-1.png
    #249344 quote
    f1_maik
    Participant
    Junior

    I would like to ask for your help once again. The last time the request was not completed successfully. But: I am very grateful for what has already been done. Here, what people do is free of charge and that’s why, once again, a big thank you.

    I have now had the text translated into mql5. Please see below. The text is not mine, the idea is not mine, I am only the messenger. The idea comes from @tenerife and @marjok. The translation into mql5 comes frome @SifaMwenda (sifafxteam). Special thanks to them too, especially to them.

     

    Now the code mql5…….
    If someone can translate it and prt allows it, please don’t forget to point to the people behind the code.

    after that you are welcome to add it to your library

    this is the oringinal code of the original trading , no improvement

     

    //+——————————————————————+
    //| Daily Direction Switch EA.mq5 |
    //| sifafx |
    //| |
    //+——————————————————————+
    #property copyright “Sifafx Team”
    #property link “https://chat.whatsapp.com/G0PqvlJ2bW40PSXuBQpdsb&#8221;
    #property version “1.02”
    #property strict

    #include <Trade\Trade.mqh>
    #include <Trade\PositionInfo.mqh>
    #include <Trade\DealInfo.mqh>

    //— Input parameters
    input group “=== Handelseinstellungen ===”
    input double LotSize = 0.1; // Lot-Größe
    input bool UsePercentSLTP = true; // Prozent für SL/TP verwenden (false = Punkte)
    input int StartHour = 9; // Startstunde für ersten Trade
    input int StartMinute = 0; // Startminute für ersten Trade
    input int CloseHour = 21; // Alle Positionen schließen um diese Uhrzeit
    input int CloseMinute = 0; // Schließminute
    input string TradeComment = “TagesRichtung”; // Trade-Kommentar

    input group “=== Richtungssteuerung ===”
    input bool ManualFirstDirection = false; // Erste Richtung manuell setzen
    input bool FirstTradeDirection = true; // true=Long, false=Short (nur wenn manuell)

    input group “=== Risikomanagement ===”
    input double SL_Percent_Trade1 = 0.25; // SL in % für Trade 1
    input double TP_Percent_Trade1 = 0.25; // TP in % für Trade 1
    input double SL_Percent_Trade2 = 0.25; // SL in % für Trade 2
    input double TP_Percent_Trade2 = 0.5; // TP in % für Trade 2
    input double SL_Percent_Trade3 = 0.25; // SL in % für Trade 3
    input double TP_Percent_Trade3 = 0.75; // TP in % für Trade 3

    input int SL_Points_Trade1 = 50; // SL in Punkten für Trade 1
    input int TP_Points_Trade1 = 50; // TP in Punkten für Trade 1
    input int SL_Points_Trade2 = 50; // SL in Punkten für Trade 2
    input int TP_Points_Trade2 = 100; // TP in Punkten für Trade 2
    input int SL_Points_Trade3 = 50; // SL in Punkten für Trade 3
    input int TP_Points_Trade3 = 150; // TP in Punkten für Trade 3

    //— Global variables
    CTrade trade;
    CPositionInfo positionInfo;
    CDealInfo dealInfo;

    datetime LastTradeDate = 0;
    int DailyTradeCount = 0;
    bool FirstTradeIsLong = true; // Direction for first trade of the day
    bool TradingEnabled = true;
    bool DayFinished = false;
    int Magic = 12345;
    ulong LastPositionTicket = 0;
    bool WaitingForNextTrade = false;
    datetime LastPositionCloseTime = 0;

    //+——————————————————————+
    //| Expert initialization function |
    //+——————————————————————+
    int OnInit()
    {
    Print(“Täglich wechselnder EA initialisiert – Version 1.02”);

    // Trade-Einstellungen konfigurieren
    trade.SetExpertMagicNumber(Magic);
    trade.SetDeviationInPoints(10);
    trade.SetTypeFilling(ORDER_FILLING_IOC);

    // Erste Trade-Richtung bestimmen
    if(ManualFirstDirection)
    {
    // Manuelle Richtungssteuerung verwenden
    FirstTradeIsLong = FirstTradeDirection;
    Print(“=== MANUELLE RICHTUNGSSTEUERUNG AKTIV ===”);
    Print(“Erste Trade-Richtung manuell gesetzt auf: “, FirstTradeIsLong ? “LONG” : “SHORT”);
    }
    else
    {
    // Automatische Richtungsbestimmung basierend auf Tagesnummer
    MqlDateTime dt;
    TimeToStruct(TimeCurrent(), dt);
    FirstTradeIsLong = (dt.day % 2 == 1);
    Print(“=== AUTOMATISCHE RICHTUNGSSTEUERUNG AKTIV ===”);
    Print(“Erste Trade-Richtung automatisch bestimmt: “, FirstTradeIsLong ? “LONG” : “SHORT”);
    Print(“Basierend auf Tagesnummer: “, dt.day);
    }

    Print(“EA bereit für Handel ab “, StartHour, “:”, StringFormat(“%02d”, StartMinute), ” Uhr”);
    Print(“Zeitstopp aktiviert um “, CloseHour, “:”, StringFormat(“%02d”, CloseMinute), ” Uhr”);

    return(INIT_SUCCEEDED);
    }

    //+——————————————————————+
    //| Expert deinitialization function |
    //+——————————————————————+
    void OnDeinit(const int reason)
    {
    Print(“Täglich wechselnder EA deinitialisiert. Grund: “, reason);
    }

    //+——————————————————————+
    //| Expert tick function |
    //+——————————————————————+
    void OnTick()
    {
    // Prüfung auf neuen Tag
    CheckNewDay();

    // Zeitstopp prüfen
    CheckTimeStop();

    // Prüfen ob Tag beendet oder Handel deaktiviert
    if(DayFinished || !TradingEnabled) return;

    // Prüfen ob Handelszeit erreicht ist
    if(!ShouldStartTrading()) return;

    // Prüfen ob maximale Tagesanzahl erreicht
    if(DailyTradeCount >= 3)
    {
    DayFinished = true;
    return;
    }

    // Aktuelle Positionen zählen
    int currentPositions = CountOurPositions();

    // Ersten Trade eröffnen wenn keine Position und kein Trade heute
    if(currentPositions == 0 && DailyTradeCount == 0)
    {
    OpenFirstTrade();
    }

    // Nächsten Trade eröffnen wenn auf Fortsetzung gewartet wird
    if(currentPositions == 0 && WaitingForNextTrade && DailyTradeCount < 3)
    {
    // Kurze Wartezeit nach Positionsschließung um sofortige Wiedereröffnung zu vermeiden
    if(TimeCurrent() – LastPositionCloseTime > 1)
    {
    OpenNextTrade();
    WaitingForNextTrade = false;
    }
    }
    }

    //+——————————————————————+
    //| Prüfung auf neuen Tag |
    //+——————————————————————+
    void CheckNewDay()
    {
    MqlDateTime current_time;
    TimeToStruct(TimeCurrent(), current_time);

    datetime todayStart = StringToTime(TimeToString(TimeCurrent(), TIME_DATE));
    datetime lastTradeDateStart = StringToTime(TimeToString(LastTradeDate, TIME_DATE));

    // Wenn es ein neuer Tag ist
    if(todayStart != lastTradeDateStart)
    {
    // Tägliche Zähler zurücksetzen
    DailyTradeCount = 0;
    TradingEnabled = true;
    DayFinished = false;
    WaitingForNextTrade = false;
    LastPositionTicket = 0;

    // Richtung für neuen Tag wechseln (nur bei automatischer Steuerung)
    if(LastTradeDate != 0) // Nicht am ersten Tag wechseln
    {
    if(!ManualFirstDirection) // Nur bei automatischer Steuerung
    {
    FirstTradeIsLong = !FirstTradeIsLong;
    Print(“=== AUTOMATISCHER RICHTUNGSWECHSEL ===”);
    }
    else
    {
    Print(“=== MANUELLE RICHTUNG BEIBEHALTEN ===”);
    }
    }

    LastTradeDate = TimeCurrent();

    Print(“=== NEUER TAG GESTARTET ===”);
    Print(“Erste Trade-Richtung: “, FirstTradeIsLong ? “LONG” : “SHORT”);
    Print(“Täglicher Trade-Zähler auf 0 zurückgesetzt”);
    Print(“Richtungssteuerung: “, ManualFirstDirection ? “MANUELL” : “AUTOMATISCH”);
    }
    }

    //+——————————————————————+
    //| Prüfung ob Handel gestartet werden soll |
    //+——————————————————————+
    bool ShouldStartTrading()
    {
    if(!TradingEnabled || DayFinished) return false;

    MqlDateTime dt;
    TimeToStruct(TimeCurrent(), dt);

    // Prüfen ob aktuelle Zeit nach Startzeit liegt
    int currentMinutes = dt.hour * 60 + dt.min;
    int startMinutes = StartHour * 60 + StartMinute;

    return (currentMinutes >= startMinutes);
    }

    //+——————————————————————+
    //| Zeitstopp prüfen und Positionen schließen |
    //+——————————————————————+
    void CheckTimeStop()
    {
    MqlDateTime dt;
    TimeToStruct(TimeCurrent(), dt);

    int currentMinutes = dt.hour * 60 + dt.min;
    int closeMinutes = CloseHour * 60 + CloseMinute;

    if(currentMinutes >= closeMinutes)
    {
    if(CountOurPositions() > 0)
    {
    CloseAllOurPositions();
    Print(“Alle Positionen wegen Zeitstopp um “, CloseHour, “:”, CloseMinute, ” geschlossen”);
    }

    DayFinished = true; // Tag als beendet markieren
    }
    }

    //+——————————————————————+
    //| Ersten Trade des Tages eröffnen |
    //+——————————————————————+
    void OpenFirstTrade()
    {
    ENUM_ORDER_TYPE orderType = FirstTradeIsLong ? ORDER_TYPE_BUY : ORDER_TYPE_SELL;

    double sl = 0, tp = 0;
    CalculateSLTP(1, orderType, sl, tp);

    if(OpenPosition(orderType, sl, tp))
    {
    DailyTradeCount = 1;
    Print(“=== TRADE 1 ERÖFFNET ===”);
    Print(“Richtung: “, EnumToString(orderType));
    Print(“SL: “, sl, ” TP: “, tp);
    Print(“Richtungssteuerung: “, ManualFirstDirection ? “MANUELL” : “AUTOMATISCH”);
    }
    }

    //+——————————————————————+
    //| Nächsten Trade eröffnen (nach SL-Treffer) |
    //+——————————————————————+
    void OpenNextTrade()
    {
    // Gegenrichtung vom letzten Trade bestimmen
    ENUM_ORDER_TYPE nextOrderType;

    // Richtungsmuster für aktuelle Trade-Nummer bestimmen
    if(DailyTradeCount == 1)
    {
    // Trade 2: Gegenrichtung von Trade 1
    nextOrderType = FirstTradeIsLong ? ORDER_TYPE_SELL : ORDER_TYPE_BUY;
    }
    else if(DailyTradeCount == 2)
    {
    // Trade 3: Gleiche Richtung wie Trade 1
    nextOrderType = FirstTradeIsLong ? ORDER_TYPE_BUY : ORDER_TYPE_SELL;
    }
    else
    {
    return; // Sollte nicht auftreten
    }

    double sl = 0, tp = 0;
    CalculateSLTP(DailyTradeCount + 1, nextOrderType, sl, tp);

    if(OpenPosition(nextOrderType, sl, tp))
    {
    DailyTradeCount++;
    Print(“=== TRADE “, DailyTradeCount, ” ERÖFFNET ===”);
    Print(“Richtung: “, EnumToString(nextOrderType));
    Print(“SL: “, sl, ” TP: “, tp);
    Print(“Grund: Stop Loss von Trade “, DailyTradeCount-1, ” erreicht”);
    }
    }

    //+——————————————————————+
    //| SL und TP basierend auf Trade-Nummer berechnen |
    //+——————————————————————+
    void CalculateSLTP(int tradeNumber, ENUM_ORDER_TYPE orderType, double &sl, double &tp)
    {
    double currentPrice = (orderType == ORDER_TYPE_BUY) ?
    SymbolInfoDouble(_Symbol, SYMBOL_ASK) :
    SymbolInfoDouble(_Symbol, SYMBOL_BID);

    double point = SymbolInfoDouble(_Symbol, SYMBOL_POINT);
    int digits = (int)SymbolInfoInteger(_Symbol, SYMBOL_DIGITS);

    if(UsePercentSLTP)
    {
    // Prozentuale Berechnung
    double slPercent, tpPercent;

    switch(tradeNumber)
    {
    case 1:
    slPercent = SL_Percent_Trade1 / 100.0;
    tpPercent = TP_Percent_Trade1 / 100.0;
    break;
    case 2:
    slPercent = SL_Percent_Trade2 / 100.0;
    tpPercent = TP_Percent_Trade2 / 100.0;
    break;
    case 3:
    slPercent = SL_Percent_Trade3 / 100.0;
    tpPercent = TP_Percent_Trade3 / 100.0;
    break;
    default:
    slPercent = SL_Percent_Trade1 / 100.0;
    tpPercent = TP_Percent_Trade1 / 100.0;
    break;
    }

    if(orderType == ORDER_TYPE_BUY)
    {
    sl = NormalizeDouble(currentPrice * (1 – slPercent), digits);
    tp = NormalizeDouble(currentPrice * (1 + tpPercent), digits);
    }
    else
    {
    sl = NormalizeDouble(currentPrice * (1 + slPercent), digits);
    tp = NormalizeDouble(currentPrice * (1 – tpPercent), digits);
    }
    }
    else
    {
    // Punkte-basierte Berechnung
    int slPoints, tpPoints;

    switch(tradeNumber)
    {
    case 1:
    slPoints = SL_Points_Trade1;
    tpPoints = TP_Points_Trade1;
    break;
    case 2:
    slPoints = SL_Points_Trade2;
    tpPoints = TP_Points_Trade2;
    break;
    case 3:
    slPoints = SL_Points_Trade3;
    tpPoints = TP_Points_Trade3;
    break;
    default:
    slPoints = SL_Points_Trade1;
    tpPoints = TP_Points_Trade1;
    break;
    }

    if(orderType == ORDER_TYPE_BUY)
    {
    sl = NormalizeDouble(currentPrice – slPoints * point, digits);
    tp = NormalizeDouble(currentPrice + tpPoints * point, digits);
    }
    else
    {
    sl = NormalizeDouble(currentPrice + slPoints * point, digits);
    tp = NormalizeDouble(currentPrice – tpPoints * point, digits);
    }
    }
    }

    //+——————————————————————+
    //| Position eröffnen |
    //+——————————————————————+
    bool OpenPosition(ENUM_ORDER_TYPE orderType, double sl, double tp)
    {
    double price = (orderType == ORDER_TYPE_BUY) ?
    SymbolInfoDouble(_Symbol, SYMBOL_ASK) :
    SymbolInfoDouble(_Symbol, SYMBOL_BID);

    bool result = false;

    if(orderType == ORDER_TYPE_BUY)
    {
    result = trade.Buy(LotSize, _Symbol, price, sl, tp, TradeComment);
    }
    else
    {
    result = trade.Sell(LotSize, _Symbol, price, sl, tp, TradeComment);
    }

    if(result)
    {
    LastPositionTicket = trade.ResultOrder();
    Print(“Position erfolgreich eröffnet. Ticket: “, LastPositionTicket);
    }
    else
    {
    Print(“Position konnte nicht eröffnet werden. Fehler: “, trade.ResultRetcode(), ” – “, trade.ResultRetcodeDescription());
    }

    return result;
    }

    //+——————————————————————+
    //| Unsere Positionen zählen |
    //+——————————————————————+
    int CountOurPositions()
    {
    int count = 0;
    for(int i = PositionsTotal() – 1; i >= 0; i–)
    {
    if(positionInfo.SelectByIndex(i))
    {
    if(positionInfo.Symbol() == _Symbol && positionInfo.Magic() == Magic)
    {
    count++;
    }
    }
    }
    return count;
    }

    //+——————————————————————+
    //| Alle unsere Positionen schließen |
    //+——————————————————————+
    void CloseAllOurPositions()
    {
    for(int i = PositionsTotal() – 1; i >= 0; i–)
    {
    if(positionInfo.SelectByIndex(i))
    {
    if(positionInfo.Symbol() == _Symbol && positionInfo.Magic() == Magic)
    {
    trade.PositionClose(positionInfo.Ticket());
    }
    }
    }
    }

    //+——————————————————————+
    //| Trade-Transaction-Handler |
    //+——————————————————————+
    void OnTradeTransaction(const MqlTradeTransaction& trans,
    const MqlTradeRequest& request,
    const MqlTradeResult& result)
    {
    // Nur Deal-Transaktionen verarbeiten
    if(trans.type != TRADE_TRANSACTION_DEAL_ADD) return;

    // Deal auswählen
    if(!HistoryDealSelect(trans.deal))
    return;

    // Deal-Informationen abrufen
    string symbol = HistoryDealGetString(trans.deal, DEAL_SYMBOL);
    long magic = HistoryDealGetInteger(trans.deal, DEAL_MAGIC);
    ENUM_DEAL_ENTRY entry = (ENUM_DEAL_ENTRY)HistoryDealGetInteger(trans.deal, DEAL_ENTRY);
    ENUM_DEAL_REASON reason = (ENUM_DEAL_REASON)HistoryDealGetInteger(trans.deal, DEAL_REASON);

    // Prüfen ob es unser Deal ist und Position geschlossen wurde
    if(symbol != _Symbol || magic != Magic || entry != DEAL_ENTRY_OUT)
    return;

    LastPositionCloseTime = TimeCurrent();

    Print(“=== POSITION GESCHLOSSEN ===”);
    Print(“Grund: “, EnumToString(reason));
    Print(“Trade-Nummer war: “, DailyTradeCount);

    // Positionsschließung behandeln
    if(reason == DEAL_REASON_TP)
    {
    Print(“Take Profit erreicht! Keine weiteren Trades heute.”);
    Print(“=== TAG ERFOLGREICH BEENDET ===”);
    DayFinished = true;
    }
    else if(reason == DEAL_REASON_SL)
    {
    Print(“Stop Loss erreicht!”);
    if(DailyTradeCount < 3)
    {
    Print(“Werde nächsten Trade in Gegenrichtung eröffnen…”);
    WaitingForNextTrade = true;
    }
    else
    {
    Print(“Maximale Trades erreicht. Keine weiteren Trades heute.”);
    Print(“=== TAG NACH 3 VERLUSTEN BEENDET ===”);
    DayFinished = true;
    }
    }
    else
    {
    // Manueller Schluss oder andere Gründe
    Print(“Position manuell geschlossen oder durch Zeitstopp.”);
    if(reason != DEAL_REASON_EXPERT) // Wenn nicht durch unseren Zeitstopp geschlossen
    {
    DayFinished = true; // Handel für den Tag stoppen
    }
    }
    }

    #249349 quote
    f1_maik
    Participant
    Junior

    it runs in de40 08:00:00 und us100 15:30:00

    #249494 quote
    f1_maik
    Participant
    Junior

    Da will man etwas beitragen und die Hilfe dafür kommt nicht. Nicht mal eine Antwort kommt. Man weiß nach 3 Tagen nicht mal, ob sich dass in prt programmieren lässt oder jemand daran denkt zu helfen ……

    You want to contribute something, but you don’t get any help. Not even a response. After three days, you don’t even know if it can be programmed in PRT or if someone will even think about helping…

    #249498 quote
    robertogozzi
    Moderator
    Master

    @f1_maik

    • Only post in the language of the forum that you are posting in. For example English only in the English speaking forums and French only in the French speaking forums.
      .
    • It may happen that people have plenty of work to do or maybe rthey don’t feel well, etc… and need more time to address some questions. It seems you have been answered many times in the last years, so I think you can’t complain you haven’t been helped!

    Please be a little more patient. Thanks 🙂

    f1_maik thanked this post
    #249519 quote
    f1_maik
    Participant
    Junior

    I’ll leave it at that and consider my contribution done. I’ll use the mql5 coding, that’s what it’s there for. Best.

    #249520 quote
    f1_maik
    Participant
    Junior

    it runs at mt5 11586186 since june this year in test there you na see it .. byebye holy prorealtime-community I am deeply disappointed nice and pls take a look on the wild side little joe .. doo, doo-doo, doo-doo, doo-doo-doo

    #249522 quote
    JS
    Participant
    Senior

    FYI, as you know, Iván handles all conversions on the platform. He does an incredible job and is probably the only one on the forum who can do this so quickly and accurately…
    Iván is likely on vacation during this holiday period, so conversions are temporarily on hold — all conversions, not just yours…

    f1_maik thanked this post
    #249804 quote
    f1_maik
    Participant
    Junior

    Again …. it runs at account mt5 11586186 since june this year in live test 10 cent per Point de40 us100 there you see it 3 varaints

    Don’t be mistaken and don’t just see the red, but the result. It’s live and the figures are accurate.

    Still not interested in translating it into PRT and playing around with it?

    Screenshot_13.png Screenshot_13.png
    #249860 quote
    f1_maik
    Participant
    Junior

    Not interested in how to make 250% from June 3 to today? No? … nice to meet you…

    Screenshot_15.jpg Screenshot_15.jpg
    #249862 quote
    f1_maik
    Participant
    Junior

    it runs live mt5 11586186 bye bye falling angels

    #249871 quote
    Iván González
    Moderator
    Master

    Hello. I was on vacation. After reading the thread, I was about to skip the translation… anyway, next time, if you want a translation of any indicator, please request it at [https://www.prorealcode.com/free-code-conversion/](https://www.prorealcode.com/free-code-conversion/)
    Here is the system.

    DEFPARAM CumulateOrders = false
    DEFPARAM FlatAfter = 210000
    //-------------------------------------//
    // Inputs
    //-------------------------------------//
    startTime=090000
    LotSize = 1
    // --- Direction ---
    ManualFirstDirection = 0// 1 = manual; 0 = automatic
    FirstTradeDirection = 1// 1 = Long; 0 = Short (only if ManualFirstDirection=1)
    // --- Risk (SL/TP) ---
    UsePercentSLTP = 0// 1=% ; 0= Points
    // --- Values in % ---
    SLPercentTrade1 = 0.25   // SL % Trade 1
    TPPercentTrade1 = 0.25   // TP % Trade 1
    SLPercentTrade2 = 0.25   // SL % Trade 2
    TPPercentTrade2 = 0.50   // TP % Trade 2
    SLPercentTrade3 = 0.25   // SL % Trade 3
    TPPercentTrade3 = 0.75   // TP % Trade 3
    
    // --- Values in Points ---
    SLPointsTrade1 = 50      // SL Trade 1
    TPPointsTrade1 = 50      // TP Trade 1
    SLPointsTrade2 = 50      // SL Trade 2
    TPPointsTrade2 = 100     // TP Trade 2
    SLPointsTrade3 = 50      // SL Trade 3
    TPPointsTrade3 = 150     // TP Trade 3
    
    //-------------------------------------//
    // LOGIC
    //-------------------------------------//
    ONCE DailyTradeCount = 0
    ONCE FirstTradeIsLong = 1
    ONCE DayFinished = 0
    ONCE WaitingForNextTrade = 0
    
    // --- Reset values
    IF Day <> Day[1] THEN
       DailyTradeCount = 0
       DayFinished = 0
       WaitingForNextTrade = 0
       // First Day direction
       IF ManualFirstDirection THEN
          FirstTradeIsLong = FirstTradeDirection
       ELSE
          // Automatic Direction
          IF DayOfWeek MOD 2 = 1 THEN
             FirstTradeIsLong = 1
          ELSE
             FirstTradeIsLong = 0
          ENDIF
       ENDIF
    ENDIF
    
    IF NOT DayFinished AND openTime >= StartTime THEN
       
       // --- Last trade ---
       IF ONMARKET[1] AND NOT ONMARKET THEN
          lastPerf = PositionPerf(1)
          
          IF lastPerf >= 0 THEN
             DayFinished = 1
          ELSE
             IF DailyTradeCount < 3 THEN
                WaitingForNextTrade = 1
             ELSE
                DayFinished = 1
             ENDIF
          ENDIF
       ENDIF
       
       IF NOT ONMARKET THEN
          
          // TRADE 1
          IF DailyTradeCount = 0 THEN
             DailyTradeCount = 1
             IF FirstTradeIsLong THEN
                BUY LotSize CONTRACT AT MARKET
                IF UsePercentSLTP THEN
                   SET STOP %LOSS SLPercentTrade1
                   SET TARGET %PROFIT TPPercentTrade1
                ELSE
                   SET STOP pLOSS SLPointsTrade1
                   SET TARGET pPROFIT TPPointsTrade1
                ENDIF
             ELSE
                SELLSHORT LotSize CONTRACT AT MARKET
                IF UsePercentSLTP THEN
                   SET STOP %LOSS SLPercentTrade1
                   SET TARGET %PROFIT TPPercentTrade1
                ELSE
                   SET STOP pLOSS SLPointsTrade1
                   SET TARGET pPROFIT TPPointsTrade1
                ENDIF
             ENDIF
             // TRADE 2 or 3
          ELSIF WaitingForNextTrade THEN
             WaitingForNextTrade = 0
             DailyTradeCount = DailyTradeCount + 1
             
             // Next trade Direction
             nextTradeIsLong = FirstTradeIsLong
             IF DailyTradeCount = 2 THEN
                nextTradeIsLong = NOT FirstTradeIsLong
             ENDIF
             
             slValuePrc = 0
             tpValuePrc = 0
             slValuePts = 0
             tpValuePts = 0
             
             IF DailyTradeCount = 2 THEN
                slValuePrc = SLPercentTrade2
                tpValuePrc = TPPercentTrade2
                slValuePts = SLPointsTrade2
                tpValuePts = TPPointsTrade2
             ELSIF DailyTradeCount = 3 THEN
                slValuePrc = SLPercentTrade3
                tpValuePrc = TPPercentTrade3
                slValuePts = SLPointsTrade3
                tpValuePts = TPPointsTrade3
             ENDIF
             
             // Open position
             IF nextTradeIsLong THEN
                BUY LotSize CONTRACT AT MARKET
                IF UsePercentSLTP THEN
                   SET STOP %LOSS slValuePrc
                   SET TARGET %PROFIT tpValuePrc
                ELSE
                   SET STOP pLOSS slValuePts
                   SET TARGET pPROFIT tpValuePts
                ENDIF
             ELSE
                SELLSHORT LotSize CONTRACT AT MARKET
                IF UsePercentSLTP THEN
                   SET STOP %LOSS slValuePrc
                   SET TARGET %PROFIT tpValuePrc
                ELSE
                   SET STOP pLOSS slValuePts
                   SET TARGET pPROFIT tpValuePts
                ENDIF
             ENDIF
          ENDIF
       ENDIF
    ENDIF
Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.

50 points system, no indikator needed


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
f1_maik @f1_maik Participant
Summary

This topic contains 14 replies,
has 4 voices, and was last updated by Iván González
6 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/04/2025
Status: Active
Attachments: 3 files
Logo Logo
Loading...