fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. jstap
    3. Best
    • Profile
    • Following 2
    • Followers 222
    • Topics 37
    • Posts 9378
    • Best 1086
    • Controversial 23
    • Groups 0

    Best posts made by jstap

    • RE: Indicator Buffer data

      mq is a lot easier as all buffers are already in the file, ex works but can be difficult. input all input parameters (I make sure all names are identical, just to eliminate a possible problem), then check if the indicator has relevant buffers, load to your MT terminal and view your data window, this will show you the available buffers, they be be in an order starting with 0, the value shown is what FX can retrieve, put in the buffer list on FX all the relevant buffers, call them what you want. Once loaded onto FX you should see all the indicator can do and the buffers in the my indicators section.

      posted in Questions & Answers
      jstap
      jstap
    • RE: heikin ashi bear to bull find low size

      You'll have to say if it does/doesn't, not recently I have tried to use HA this way, but didn't show the right candle, why I used ChatGPT and it said:

      Why the lines appear on the wrong candle
      Your logic is correct, but the visual mismatch happens because of how MT4 handles:

      • Heikin‑Ashi indexing
      • Shift timing
      • Bar completion
      • Redrawing on every tick
        Two things cause the lines to appear on the 3rd candle instead of the 1st:
      1. Heikin‑Ashi is not aligned with the chart candles
        You’re drawing lines on the real chart, but your logic is detecting HA candles, which do not line up 1:1 with the visible candles.
        So:
      • HA shift 1 ≠ real chart shift 1
      • HA shift 2 ≠ real chart shift 2
        This alone can move your line forward by 1–2 candles.
      1. Your code uses Time[1], but the HA candle you detected may actually correspond to Time[2] or Time[3]
        Because HA candles are synthetic, the “bullish HA candle at shift 1” might visually appear on the chart two candles later.
        So the line is drawn correctly according to your logic, but not where your eyes expect it.

      so good luck relying on the standard blocks... as in your picture above it looks like this is the problem you are facing.

      posted in Questions & Answers
      jstap
      jstap
    • RE: Problem generating Oninit code?

      Ask AI:

      Looking at the code, I can spot a few issues:

      1. static variable won't work in a Custom Block
        static ulong last_logged_deal = 0; — Static variables inside FXDreema custom blocks don't persist between calls the way they would in a native MQL5 function. This means last_logged_deal will reset every tick, so the duplicate-deal guard will never actually work.
        Fix: Use a Global Variable instead:
        mql5ulong last_logged_deal = (ulong)GlobalVariableGet("LastLoggedDeal");
        And after updating it:
        mql5GlobalVariableSet("LastLoggedDeal", (double)deal_ticket);
      2. No HistorySelect call before accessing history
        HistoryDealsTotal() and HistoryDealGetTicket() require history to be loaded first. Without this, you may get 0 deals even when history exists.
        Fix: Add before your history calls:
        mql5HistorySelect(0, TimeCurrent());
      3. Missing CSV header row
        The file is opened in append mode (SEEK_END) every time, so there's no header written. This makes the CSV harder to work with in Excel etc. You'd want to check if the file is new/empty and conditionally write a header row first.
      4. _Digits used for spread
        Spread is typically displayed as points, not price digits. Using _Digits gives you a raw price difference like 0.00010 rather than the more readable 1.0 (in points). Consider:
        mql5DoubleToString(spread / SymbolInfoDouble(symbol, SYMBOL_POINT), 1)
      5. FILE_SHARE_WRITE without FILE_SHARE_READ
        If anything else tries to read the file while it's open, it'll be blocked. Adding FILE_SHARE_READ is safer:
        mql5FILE_READ|FILE_WRITE|FILE_CSV|FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_COMMON
        The most critical of these is #2 (missing HistorySelect) and #1 (the static variable not persisting) — both could cause the logger to silently log nothing or log duplicates.
      posted in Questions & Answers
      jstap
      jstap
    • RE: About the Chrome extension to download files

      Start a new question for this, only ex files created on FX can be used (except indicators, they can be used in a FX EA)

      posted in Questions & Answers
      jstap
      jstap
    • RE: Problem generating Oninit code?

      Yes (possibly) you could generate a custom block, but this gets quite difficult, but if you understand how you may manage it, the easiest way is to ask AI a few questions, on trade may go into here, in here you will see how the sections work, for this I think you need to treat the setting section as on trade which is where you would use the block, ask ai what code should go in what section. Save and use the block in a project, any errors that come up will be from what is written in "create custom blocks, keep changing/saving/refreshing project.

      posted in Questions & Answers
      jstap
      jstap
    • RE: Re-open trade at Double the lot size after stop loss is hit

      trade signal - (pink) for each closed trade - buy/sell (lot selected in a loop adjusted to *2)

      posted in Questions & Answers
      jstap
      jstap
    • RE: Re-open trade at Double the lot size after stop loss is hit

      This is only buys and is done on the on trade tab to separate the first trade from multiply lot trade.

      msedge_OsWgOI3eJk.png

      posted in Questions & Answers
      jstap
      jstap
    • RE: Does anyone know how to check distance between current price and the ema line?

      Like the picture, in the condition choose a to reset (to stop multiple notifications):
      msedge_veCAcBI85o.png

      posted in Questions & Answers
      jstap
      jstap
    • RE: Does anyone know how to check distance between current price and the ema line?

      Yes and more, the best way to work things out even when you have what to do, is put the values in a comment, or draw objects to show what is visibly happening in backtest, you can then use this to check what you want/think is happening... You can try this, connect off yellow what to do when distance is true: 8d080644-f220-4535-bba8-14a2e655f6de-msedge_Xhuk3AaWxu.png

      posted in Questions & Answers
      jstap
      jstap
    • RE: Profit per session then stop

      Try this, be careful GMT is actually reading GMT time, I have set (period of time) +2 as this block doesn't use GMT, set to your server offset, the only way to stop trading is to put a block in that prevents it.

      msedge_UnxzJN1F0v.png

      posted in Questions & Answers
      jstap
      jstap
    • RE: How to keep a fixed reference balance per trade in FxDreema (multi-EA issue)

      This should do it, there is code on two tabs: https://fxdreema.com/shared/UPExIp7D

      posted in Questions & Answers
      jstap
      jstap
    • RE: One Trade Cycle Per Candle (No Re-Entry After TP/SL in Same Candle)

      On tick tab your logic allows the trades put this under a flag - on trade tab trade closed set the flag (so no more trades can be placed) - on tick once per bar (reset the flag (so trades can be placed).

      posted in Questions & Answers
      jstap
      jstap
    • RE: How to Allow Only One Order Per 4H Candle

      What don't you understand? after all your place a trade conditions, use a once per bar (candle) set to how you want, then place the trade you want placed...

      posted in Questions & Answers
      jstap
      jstap
    • RE: Library Studio

      the calculatedlot that is saved into the calculatedlot variable in the function is then used from the variable in the project EA

      posted in Questions & Answers
      jstap
      jstap
    • RE: Library Studio

      how is your global variable set? If it's not it can't return true.

      posted in Questions & Answers
      jstap
      jstap
    • RE: how to integrate an external EA in fx dreema made EA?

      @sktsec @bacharchoura1 I disagree with that FX has a lot of very useful blocks, AI can be smart but sometimes too smart. Mixing custom code blocks, indicators, FX blocks can all work together well. This picture shows the amount of AI generated, checked and perfected blocks I am currently using.

      msedge_seSfNhzY2n.png

      posted in Questions & Answers
      jstap
      jstap
    • RE: Lot size limit.

      @Chen-7 I guess you mean if you click the place trade button in the top left... if so you will need to create buttons that place a trade when clicked buy using FX blocks.

      posted in Questions & Answers
      jstap
      jstap
    • RE: EA won't backtest but works live

      Backtest, although close on MT5 compared to MT4 it is still a simulated environment, is likely your custom indicator, you have to remove to test what happens...

      posted in Questions & Answers
      jstap
      jstap
    • RE: Lot size limit.

      Did not mention too bigger lot, That is your choice, just mentioned how to limit it when you trade.

      posted in Questions & Answers
      jstap
      jstap
    • RE: highest and lowest price between two time stamps

      You can add this into the block time stamp box: TimeToString(xxxxxxxxx,TIME_DATE | TIME_MINUTES);

      posted in Questions & Answers
      jstap
      jstap
    • 1
    • 2
    • 51
    • 52
    • 53
    • 54
    • 55
    • 54 / 55