fxDreema

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

    Posts made by jstap

    • RE: Any instructions about the On Trade & On Chart tabs?

      The tabs tells you what they do, on init = at EA start (initialisation), on timer = only when the timer event fired (change this in settings), on trade (non mt4 native, so internally goes in on tick) = work with running trades, on chart = many things you see on chart, trades on mt4 are fired from here (in backtest use on tick), on deinit = all actions when removing/stopping EA working (like deleting everything drawn on the chart).

      posted in General Discussions
      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: [FR] Version Control History

      I don't know if admin will do this, for now only option is download the ex and import back... this will leave it in your project list.

      posted in Bug Reports
      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: 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: heikin ashi bear to bull find low size

      Add a shared project link rather than mq4. project screen - projects - create project link -open in browser - copy address bar and past here. As for using the standard blocks they cannot amend the candle ID so will have to use custom code regardless.

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

      I think the HA problem is how it measures the candles, try this and see if it works correctly: https://fxdreema.com/shared/bIah92CYd

      posted in Questions & Answers
      jstap
      jstap
    • RE: My biggest project so far

      @KLG.... 👍

      posted in General Discussions
      jstap
      jstap
    • RE: My biggest project so far

      @KLG So you are saying all I said is correct, and you use AI and custom code to make it work better?

      posted in General Discussions
      jstap
      jstap
    • RE: My biggest project so far

      Ok, you are right, I have built projects with thousands of blocks,,, but these tend to consume computer power on back test, rather than actually make the bot better. Adding custom code blocks can considerably cut this, and speed things up (especially on backtest).

      posted in General Discussions
      jstap
      jstap
    • RE: My biggest project so far

      That doesn't show a lot, but lots of blocks aren't normally needed...

      posted in General Discussions
      jstap
      jstap
    • RE: Problem generating Oninit code?

      @machTucker 👍

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

      No mate, only the Amazon version, you can get the app to view it on the ipad.

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

      you just need a pass block above it, single blocks don't work on FX

      posted in Questions & Answers
      jstap
      jstap
    • RE: And Block

      bool is simply true/false, so i9t either pass es on to next or not, without seeing inside blocks your conditions may be the bigger problem, once per bar above means it fires first requiring the condition to be true at that point in time, once per bar is generally better under the conditions. The and block is pointless in this case, because condition on top of condition on top of condition without the and means 3 conditions have to be true to work. The and block is expecting the 3 above blocks to be true at the same time, but if the bool is false then only 2 can be, if you connect the yellow bool dot to the and block then the 3rd condition will be skipped and and will work of 2 conditions.

      posted in Questions & Answers
      jstap
      jstap
    • RE: Indicator Buffer data

      Is this the standard indicator? Past that into AI and see what answer you get.

      posted in Questions & Answers
      jstap
      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: daily profit

      Like this.
      https://fxdreema.com/shared/oficgTI0b
      msedge_aadMbAtgOU.png

      posted in Questions & Answers
      jstap
      jstap
    • RE: WHY OPTIMIZATION IS SO SLOW WHEN I USE "ON TRADE" BLOCKS ?

      @bacharchoura1 👍

      posted in Questions & Answers
      jstap
      jstap
    • RE: WHY OPTIMIZATION IS SO SLOW WHEN I USE "ON TRADE" BLOCKS ?

      You will have to create a block, not really tested much with this though:
      https://fxdreema.com/forum/topic/21603/close-all-mt5-trades-quickly

      posted in Questions & Answers
      jstap
      jstap
    • 1
    • 2
    • 6
    • 7
    • 8
    • 9
    • 10
    • 466
    • 467
    • 8 / 467