
you are redrawing each object, the name will never change from SUP. You're calling on object named SUP8.
C0 low will never cross above anything. It can be above, or can have been above something.

you are redrawing each object, the name will never change from SUP. You're calling on object named SUP8.
C0 low will never cross above anything. It can be above, or can have been above something.
one way to do it, modify something with a "Current time" timestamp.
@prot82 said in What is executed first, "On Tick" code or "On Trade" code when trade happens?:
Hi Guys,
What is executed first, "On Tick" code or "On Trade" code when trade happens?
For example, if the same variable is changed by some code in the "On Tick" tab and also in the "On Trade" tab and some trade happened in the market;
So, 2 things has happened in one market tick, "On Tick" has triggered by market tick and "On Trade" has triggered by trade.
In that situation, both tabs ("On Tick" and "On Trade") will change variable, which one will be first?
Why dont you tell us?
@veetee said in Why am I getting loss trades because trades are not closing at 2 MAs crossing?:
@tipsywisdom hi, thanks for the tip. it does not work with no group numbers. I use it to separate the closing of the buys and sells. How do I set everything to automatic?
buys and sells should only be handled as buys and sell, not with group numbers...it further complicates things beyond expectation. Unless you absolutely need to have group numbers, dont. Buy and sell is more than enough. Now when you start enter several buy positions for different reasons that need to be handled in a variety of take profit scenarios, thats why you would need group numbers.
outside of that, your no position blocks have the incorrect logic. 
How do you expect to close the profitable positions after that condition is met if the no position block is only filtering for buys to pass through?
@ontradingx said in Multi symbols how to use correctly?:
I noticed that the block " Set "Current Market" for next blocks " doesn't seem to work properly when there are variables in the strategy or drawings like horizontal or trend lines.
For example, if in the strategy there was a condition to check if the candle (1) crossed above a horizontal line, the EA will only check this on the main symbol, the other symbols will be ignored because in the backtest it is impossible to print this lines on them so the crossover will not happen.
With that in mind, I wanted to know if there is any way we can get around this without having to create a sequence of new rules for each symbol I want to trade.
It's possible ?
i did a tutorial for how I pulled data on 3 indexes to display on 1 of the 3. Its within the last 2 months. hopefully it helps.
onl;y specify buy or sell differentiation.
remove all group numbers, no need to use them. Just set everything to automatic.
that will solve many of the problems.
@greenplanet said in Compilation Warning MT4 Metaeditor Possible loss of Data:
i have build a strategy without using the green time blocks.
i have build 4 lines.
no trade (buy) --> condition blocks (10 blocks) --> buy
no trade (sell) --> condition blocks (10 blocks) --> sellif trade (buy) --> condition blocks (10 blocks) --> close buy
if trade (sell) --> condition blocks (10 blocks) --> close sellthat's all. i converted by clicking on mq4 in the left upper corner
then i used Metaeditor (MT4) to compile the mq4 and the result is - what you can see in the screenshotthe strategy is working. but the warning i do not understand
project link? custom indicators?
@veetee said in Why am I getting loss trades because trades are not closing at 2 MAs crossing?:

you should be able to find a real chart example of the trade setup you have already proven in backtest....
@mcvinbabas said in ATR pips:
@jstap hi can you teach me how can i use in connecting buy block , i was confuse how to use this formula.
Thank you
this is a calculation for entry into any strategy. it is not a strategy.
@greenplanet said in Compilation Warning MT4 Metaeditor Possible loss of Data:
Somebody know what's wrong? I tried to compile by using Metaeditor (MT4)
Some way you are trying to use time is wrong.

one of the easiest ways to do it. check profit average, if profit is ever over a specific daily amount for your target, you just turn off the blocks for trading, and then once per bar, daily, turn them back on again. It will turn them on at the start of the new day!
@mywife said in Terminate EA:
@tipsywisdom I think so, better right. Actually can give me sample block to cancel for the trade period, sir. Thank for advice.
its totally up to you and your trading period.
ill get you a screenshot...i typed the words first, but its missing something.
dont terminate after profit target, you will just want to cancel for the trade period.

I didnt double check the formula, but I think this is right...or the logic is close, but this is the idea. Turn any price move into a variable with a formula.
This is how I would use 10% of price for example, as a variable.
honestly, this is a very simple EA that can be solved using the standard dreema webpages for help.
https://fxdreema.com/examples
https://fxdreema.com/documentation
your problem can be understood easily if you read it back to yourself on the, if position, side.
@ontradingx said in Automated distance calculation. How to make?:
Does anyone have any idea how I can perform distance calculations between objects in a simpler and more automated way?
Currently I have to figure out which distance multiplier I should use to plot other lines on the chart.
I will cite some examples:
Note my lines R1, R2, R3 they are symmetrically spaced but for this to happen I had to multiply by x1000 note that the asset price is in the format 000,000In this case I'm using the Crypto market, but if I'm going to trade Forex, then I have to multiply it by x10000
If I'm going to use it in CFD I have to multiply by x100And these multipliers change from broker to broker.
Is there a way for the EA to find the ideal multiplier according to the price or something similar so that I don't have to keep trying to figure out this part?
![]()
price %? eh. probably not.
Its very difficult because every asseet , each measurement will change. Pips, Ticks, Points, Price, Price %. Its all variable and not on the same scale. But of all of them, price % is probably the most universal.
@duepips very awesome!
I hpersonally recommend not doing anything faster than a 1m TF for the most you can do to your EA as far as candle control, and backtest speed.
asia session isnt the last 7 candles, asia session is an actual time.
use time,

poorly designed blocks (bad code) will also result in slow lethargic EA's. For the most part, EA's can be done in such a way they are not a huge burden on computer resources. Even doing a few calculations.
The things that utilize the most resources are pending trades, being in trades, and retaining objects. Each object is cached and remember, its wise to delete drawings that are considered invalidated. If you are clever enough, you can do a time based deletion of things that anything of X age, is removed... 