@moon
We update the PreviousBalance variable at the point when there is no trades.
When there are some trades, compare the current equity to the previous balance. If it is 100 units bigger, close trades
Posts made by roar
-
RE: how i do that in fxdreema in equity ?posted in Questions & Answers
-
RE: how i do that in fxdreema in equity ?posted in Questions & Answers
@moon
Use a variable to store the previous balance:
https://fxdreema.com/shared/LmbanX11b -
RE: Lot size based on a variable value?posted in Questions & Answers
@jennifer
Yes, this works, it can be either "fixed value" or "custom value" to my experience..
Remember to use visual backtest before trading real money -
RE: Profit trailingposted in Questions & Answers
@mmaarits
You have to use some kind of "trailing start", a treshold before applying the "% of profit" trailing, because 50% of 0 is 0, so it will not work at the open price.

This trails 50% of profit, it does not have just 2 steps like in your example, it continuously adjusts the distance.
@mmaarits said in Profit trailing:
if price has reached 75% of TP level, move SL to 50% of TP level
Why the 3rd step is not half of profit anymore? Do you need some exponential function, like the trailing stop gets thinner the closer the TP is?
-
RE: Trying to set buy/sell at candle close not working rightposted in Questions & Answers
@makamilman
Try this version, I think it is closer to what you want:
https://fxdreema.com/shared/5EHm72tLd
What I changed:- condition blocks use candle ID 1, that is the latest completed cande, not the updating one.
- because we check the history candle, we can do it only "once per bar" because the situation won't change anyway until a new bar appears
- trailing stop and breakeven don't need separation to buy/sell.
- "trailing start is 100% of trailing stop" = trailing stop starts at the open price
-
RE: Profit trailingposted in Questions & Answers
Try the trailing stop, it has all kinds of options, like trail by a % of profit or a % of TP
-
RE: saving lot size in variableposted in Questions & Answers
@jennifer
I guess "OrderLots()" works. You need to first tell the EA which order you mean, hence the "for each trade"

-
RE: Trying to set buy/sell at candle close not working rightposted in Questions & Answers
In your fxdreema builder go "project" -> "create shared copy".
Solution: use the block "once per bar" at the top of your logic tree
-
RE: saving lot size in variableposted in Questions & Answers
@jennifer
Oh, sorry, it seems that function is only MQL5... I don't know if there is an MQL4 equivalent -
RE: saving lot size in variableposted in Questions & Answers
@jennifer
You can put custom code pretty much everywhere in fxdreema, like this for example

-
RE: saving lot size in variableposted in Questions & Answers
Try this function: PositionGetDouble(POSITION_VOLUME)
-
RE: Is it possible to change the value of an indicator using an EA?posted in Questions & Answers
@rafaelgrecco
I must admit I'm not expert on custom indicators, but can it be changed here, in the "My Indicators" menu?

-
RE: Is it possible to change the value of an indicator using an EA?posted in Questions & Answers
Surely you can take that value and store it as a variable at some point of your EA? Modifying a variable is simple.
-
RE: Phantom Moving Averageposted in Bug Reports
EURUSD M30, every tick:

Really strange if you get different results.. Do you have these default inputs?

-
RE: Multidimensional Arraysposted in Questions & Answers
Hey, is this implemented in fxdreema yet? I'd like to make an array that has separate "rows" for each pair.
-
RE: Scalping micro pips strategy.posted in Questions & Answers
Hi!
This is a grid system, you can do it like this for example: https://fxdreema.com/shared/Hm8jwqDC -
RE: Mql5 EA buildposted in Questions & Answers
@spicynote said in Mql5 EA build:
@roar
I notice there are two shorts right next to each other without breaking supports.The first one is closing the buy trade, second one is opening the sell as there are 2 candle closes below MA.
-
RE: Stop and reverse strategy(No martingale)posted in Questions & Answers
@arrow82
Well, do you have a fxdreema project for this? Did you even try?
-
RE: Mql5 EA buildposted in Questions & Answers
@spicynote
I tested the project I shared earlier: https://fxdreema.com/shared/Y3lUXgVrb
Found a little bug - close sell condition was "below" instead of "above".
Now the EA works as designed.
It surely does make some stupid trades, but lets not blame the poor algorithm. It just does what we tell it to do
