Checking age has been tricky for me too..
In some case I have decided to simply use variables to count the age, like:
once per bar -> modify variable barcount to barcount +1
-> reset the variable when trade closes, or any other condition you like. Very flexible solution 
Posts made by roar
-
RE: Check Ageposted in Questions & Answers
-
Hide the visual modeposted in Questions & Answers
I'm thinking of sharing my eas to other traders, but I don't want others to reverse engineer my artwork

Is there some way to block the reverse engineering using MT visual testing mode?
-
RE: EA Trading Frequencyposted in Questions & Answers
There is no right answer here... 14 EMA on M5 chart is 60 EMA on M1... Its all about the strategy as whole, what kind of enters/exits you are aiming at.
In my experience, RSI is better tool to use in short periods, especially scalping - use EMAs for general direction, crossovers are always too late

-
RE: Storing price levels on multi-currency systemposted in Questions & Answers
Well, the storing values to object -approach worked after all

Edit: No it didn't

For each object -block still needs the chart id to check from.. What does the id actually mean? Is there a way to set it to work just on the "current" chart?Edit2: Worked around my problem by placing one new pending order every time theres a position running but no orders.. I'm almost happy with this,
-
RE: Storing price levels on multi-currency systemposted in Questions & Answers
So I'm building a multi-currency grid-system on mt5. Once I add to volume on existing trade, I want the ea to remember the current price so I can restrict the ea from opening new trades too close to previous opening price.
Pips away from open price -block wont work, because mt5 ignores the LAST position increment and instead uses the average open price.
Storing current candle price at the time of opening to a variable also won't work, because that can't be used on multicurrency - I want to optimize this on many currencies at once.
This COULD be done simply with the "buy pending orders in grid" block, but I don't want to use that because it has certain limitations.
I've been trying to draw a horizontal line at the time of incrementing the position so the ea could check that line individually on every chart - but I can't get it to work.
Any other solutions to this?
-
RE: Fractal indicatorposted in Questions & Answers
The fractal signal needs to be checked on candle ID 2, not 0 which is default.
Reason: For example, fractal UP needs formation where one candle (ID2) is higher than the candles around it so the candle after highest (ID1) needs to be completed before the condition is true.Hope this helps you.
-
RE: How can I work with BUYLIMIT and SELLLIMITposted in Questions & Answers
The limit/stop changes automatically, depending on where the order is compared to current price, doesn't it?
If you place a buy order at 1.000 and current price is 1.100 it will be a buy limit. -
RE: Working with objectsposted in Questions & Answers
No indicator, its an object drawn by the bot.
In the condition block you can select "object on the chart" which i used. -
RE: Working with objectsposted in Questions & Answers
I will probably have about a million troubles with my object project, so lets start a thread on objects

I'm trying to compare standard deviation channel LOWER LINE to current price. I couldn't find the option on "object on the chart" attributes.
However, looks like selecting "trend line price level (by candle ID)" is picking up the channel's median line, and I got the lower by subtracting the std dev with a formula block... Is there any easier way? -
RE: Take Profit auto adjustmentposted in Questions & Answers
Yup, you can do this with "pips away from open-price" and "modify stops" blocks
-
RE: Breaking loopposted in Questions & Answers
The "Loop (pass n times)"... Is there a way to break the loop after certain criteria, like with position loops? That would speed up my ridiculously heavy .ex

The cycle value is a variable, could it work if I modified the variable 0? -
RE: Stochastics Indicatorposted in Questions & Answers
Your logic seems to be fine.. Maybe the stochastics is repainting, try visual mode to find out?
-
RE: Activation of Trailing Stopposted in Questions & Answers
Look at the trailing stop block - there is section called Trailing Start -> % of trailing stop -> use 100% to start trailing after 100% of the defined pips

-
RE: The strategy from scratch questions and problemsposted in Questions & Answers
The profit is equity-balance, as the block says. Which means, if you have 10000 balance and gain set to 1, your trade should be on profit 10001 (equity 20001) to be closed.
Your tree is overcomplicated anyways. You need just the condition (profit > gain) and close. Same logic, much less fuss
-
RE: Check profit (last closed)posted in Questions & Answers
Looks like the check profit block start looping the sell after.. Try to set group number 1 to the first sell, and group 2 for the second sell block - then filter "check profit" to group 1 only.
As for the second problem, I didn't catch your idea

-
RE: Running same EA on multiple pairsposted in Questions & Answers
Multicurrency on mt4 is pain in the ass, at least compared to mt5 which I have much more pleasant experience. Care to share your fxdreema coding process?
-
RE: Please help: Place ATR Stop Loss?posted in Questions & Answers
If I understood this right, you want to modify your stop just once. Now the bot modifies it on every tick though, and so forgets about your open bar as time passes.
Use "check stop-loss" (needs to equal 0) and modify the stop only then. -
RE: Place line at Highest open and Lowest open?posted in Questions & Answers
Use a variable?
Once a day -> modify variable Highest to 0
Once a bar -> condition (open > Highest) -> modify variable highest to open -> draw a line on Highest -
RE: Deleting old objectsposted in Questions & Answers
Oh, thanks for the insight.
Im dumping the many objects though, realized its easier to make candle id a variable, loop x period of candles and formula the calculations necessary. Goal is to measure distance to trend line on x previous bars.
I have been using dreema for over 2 years without playing around objects or loops, they seem to open quite endless possibilities
-
RE: Maximum number of orderposted in Questions & Answers
I worked situations like this with a variable. Like this:
When the crossover happens, modify variable Count to 0, just to erase the old count.
Then proceed your block tree to the order creation, and after order, modify variable Count to Count+1.
Simple as that, now you just add condition block (Count < max order number) to restrict further orders.