@l-andorrà
Hi everyone,
I am working on a trading robot in Fxdreema and would love some help to make sure my logic is set up correctly.
The Strategy:
I am using Heiken Ashi and a Smoothed Moving Average (SMA). The goal is to buy during a pullback in an uptrend.
The Rules:
Trend: Heiken Ashi candles must be above the SMA.
Pullback: I need to see a sequence of Bear candles (minimum 1, maximum 4).
The "No Touch" Rule: Crucially, these Bear candles must NOT touch the SMA (Heiken Ashi Low > SMA).
Entry: Buy when a Bull candle appears after the pullback. This Bull candle must also NOT touch the SMA.
Exit:
Stop Loss (SL): At the current price of the SMA.
Take Profit (TP): Using a 0.5 Reward-to-Risk ratio.
windsor-2003
@windsor-2003
Sharing, Talking, Asking, Exchanging about Fxdreema.
Here is just a little community Discord Sever we can discuss or share whatever about Fxdreema (https://discord.gg/d5MDNqaQhB)
See you there!!!
Latest posts made by windsor-2003
-
Help Needed: Heiken Ashi + SMA Pullback Strategy (Up to 4 Bear Candles)posted in Questions & Answers
-
How to calculate basket Break-Event price (weight average) by using ATR?posted in Questions & Answers
Question for Fxdreema CommunityHello everyone,
I’m working on a basket / recovery strategy and I want to use ATR to calculate one Break-Even price to close all open orders (not per order).
Conceptually, I understand that I need to calculate a weighted average basket price, like this:
BasketPrice = Σ (OrderOpenPrice × OrderLots) / Σ OrderLotsExample:
(1.10000 × 0.10) + (1.09800 × 0.20) + (1.09600 × 0.40) ----------------- = BasketPrice 0.10 + 0.20 + 0.40After that, I want to do:
- BUY basket →
BasketBE = BasketPrice + ATR - SELL basket →
BasketBE = BasketPrice − ATR
My problem is how to calculate this weighted basket price inside Fxdreema blocks.
Specifically, I’m not sure:
- Which blocks should be used to loop through all open orders
- How to accumulate (sum) OrderOpenPrice × OrderLots
- How to sum total lots
- And where to store these values so I can calculate
BasketPrice
If anyone has done something similar (basket BE, recovery, or grid systems), I’d really appreciate guidance on the correct block structure or logic flow in Fxdreema.
Thank you very much

- BUY basket →
-
RE: How to use ZigZag indicator to measure and store swing distance (in pips)?posted in Questions & Answers
Big Thank Big Man very need your help
-
How to use ZigZag indicator to measure and store swing distance (in pips)?posted in Questions & Answers
Hi everyone,
I’m trying to build an EA in FXDreema that can measure the total swing size between the latest ZigZag high and low — basically how many pips the market moved from one point to the next.
What I want to do is:
Use the ZigZag indicator to detect the last swing high and swing low.
Calculate the distance in pips between those two points.
Store that value in a variable (for example, LastSwingPips) so I can later use it for money management or filters.
I’ve tried using “Indicator value” blocks in FXDreema, but I’m not sure how to correctly pick the last swing points or calculate the difference between them.
Can anyone share a step-by-step or example on how to do this in FXDreema (or MQL4 if easier to explain)?
Thanks in advance

-
RE: Block BUYS & Reinforce SELLS on ZigZag High Breakposted in Questions & Answers
@l-andorrà more clear point:

The red line is Zig Zag, at that time I had ordered buy 1, but that still was not closing at H0. So my next move is when the price moves below L,0, I will open Buy 2.
So the point is, whenever Zig Zag starts to create H and L, it will start to count as H0 and L0 and the period H and L will change every time. Then, how do I set up the block to buy when the price moves below L0?
Big Thanks, Big Man... very need your help.
-
RE: Block BUYS & Reinforce SELLS on ZigZag High Breakposted in Questions & Answers
Big Thanks for jumping in! l'andorrà

I’m actually looking for the step-by-step fxDreema block setup rather than the raw MQL5 code. Could you show me how to piece together those blocks in fxDreema to:
- Store and update the ZigZag pivot high when a SELL opens
- Suppress any BUY blocks while the SELL is still active
- Trigger a new SELL block once the price breaks the stored pivot high
A clear walkthrough of each block and its parameters would be hugely appreciated.

-
Block BUYS & Reinforce SELLS on ZigZag High Breakposted in Questions & Answers
Hello everyone,
I’m working on an MQL5 Expert Advisor that uses the ZigZag indicator to detect trend turns. My current logic is:
- When a sell condition is met, open a SELL order.
- When a buy condition is met, open a BUY order.
However, during pullbacks after a SELL entry, the ZigZag sometimes draws small counter-trend swing structures that trigger a BUY signal—so the EA opens a BUY while still holding the initial SELL.
What I actually want is:
- Suppress any BUY orders as long as the original SELL position remains open.
- Track the price of the ZigZag pivot high at the time of the initial SELL entry (i.e. the swing high that triggered the sell).
- When price breaks above that pivot high, open another SELL order (to reinforce the short) instead of opening a BUY.
Could anyone show how to implement this in MQL5? Specifically:
- How to record and update the last ZigZag swing-high price in OnTick() (using CopyBuffer or similar)
- How to detect and compare the current Bid price against that stored pivot high
- How to bypass BUY logic when a SELL position is open
- How to send an additional SELL order when the pivot high is broken
A code snippet or tips on integrating this into the OnInit() / OnTick() structure would be hugely appreciated!
Thank you in advance.]
-
Lock in profitposted in Questions & Answers
@fxDreema, could you mind sharing with me again? I am really trying this part and still don't know what to do, please .


-
RE: Move stop loss to last take profitposted in Questions & Answers
After modifying the stop loss of the second trade, calculate the distance between the new stop loss and the entry price. If that distance is less than or equal to -10 pips (i.e., SL is more than 10 pips away in loss), close the second trade.
You can use "For Each Trade" block with Skip every "n" trade = 1 — this will select the second trade.
Then, use "Pips away from Stop Loss" or "Pips away from Open Price" to calculate how far the stop loss is from the entry.
If the pips from SL > first target (e.g., 10 pips), use a "Close Trade" block to close the second trade automatically.