Attach your project link and I'll show you from there: project screen - projects - create web link - open in browser - copy address bar - paste here
Posts made by jstap
-
RE: Re-open trade at Double the lot size after stop loss is hitposted in Questions & Answers
-
RE: Re-open trade at Double the lot size after stop loss is hitposted in Questions & Answers
trade signal - (pink) for each closed trade - buy/sell (lot selected in a loop adjusted to *2)
-
RE: I was wondering if there's anyone who ever build a quant using fxdreemaposted in General Discussions
How long is a bit of string? Some yes... some no... but people don't fill out a table of success, along there journey. But anyone that can do it with code, can do it with FX.
-
RE: I was wondering if there's anyone who ever build a quant using fxdreemaposted in General Discussions
Yes. Any EA you build—whether in FXDreema, MQL, or Python—is a quant system if it expresses rules, logic, and measurable behaviour. FXDreema is just a visual interface for building algorithmic logic. The reason you don’t see many "quants" talking about it is because most quant developers prefer coding directly, but the underlying concept is the same.
-
RE: Problem generating Oninit code?posted in Questions & Answers
Of cause it was, even great coders will use AI, is much quicker than Writing it yourself. This will give you an idea of what goes where: https://fxdreema.com/forum/topic/21603/close-all-mt5-trades-quickly/14
-
RE: Problem generating Oninit code?posted in Questions & Answers
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.
-
RE: Any instructions about the On Trade & On Chart tabs?posted in General Discussions
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).
-
RE: Problem generating Oninit code?posted in Questions & Answers
Ask AI:
Looking at the code, I can spot a few issues:
- 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); - 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()); - 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. - _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) - 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.
- static variable won't work in a Custom Block
-
RE: [FR] Version Control Historyposted in Bug Reports
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.
-
RE: About the Chrome extension to download filesposted in Questions & Answers
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)
-
RE: heikin ashi bear to bull find low sizeposted in Questions & Answers
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:
- 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.
- 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.
-
RE: heikin ashi bear to bull find low sizeposted in Questions & Answers
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.
-
RE: heikin ashi bear to bull find low sizeposted in Questions & Answers
I think the HA problem is how it measures the candles, try this and see if it works correctly: https://fxdreema.com/shared/bIah92CYd
-
RE: My biggest project so farposted in General Discussions
@KLG So you are saying all I said is correct, and you use AI and custom code to make it work better?
-
RE: My biggest project so farposted in General Discussions
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).
-
RE: My biggest project so farposted in General Discussions
That doesn't show a lot, but lots of blocks aren't normally needed...
-
RE: Problem generating Oninit code?posted in Questions & Answers
No mate, only the Amazon version, you can get the app to view it on the ipad.
