Well, this block does A-B and compares this to C. The time is in it's own format - seconds from 1.1.1970 - and you can for example compare Candle Time [0] (or the current server time, notice that Candle Time does not change in every second) with another Candle Time that you have it in a variable. Again, this is measured in seconds, so foe example 1 hour is 3600 seconds.
If this function can also help: http://docs.mql4.com/en/common/periodseconds
Posts made by fxDreema
-
RE: Distance less than certain amount of timeposted in Questions & Answers
-
RE: Printing Group # and/or other textposted in Questions & Answers
That comment section on the left is native for MT4 and MT5, it's how it is and cannot be modified... and is not treated as an object. To print text somewhere else object is used - Label or Text object. Here is the difference:
http://docs.mql4.com/en/constants/objec ... t/obj_text
http://docs.mql4.com/en/constants/objec ... /obj_label
I started to write 1 block to draw all available objects once and as you can guess I abandoned that block. I don't know when will I finish it, but at least now the new MQL4 is done and I have green light
-
RE: ΠΠΎΠΌΠΎΡ Π·Π° ΠΠ ΠΏΡΠ΅ΡΠΈΡΠ°Π½Π΅posted in Questions & Answers
Group Π½ΠΎΠΌΠ΅ΡΠ° Π±ΠΈ ΡΡΡΠ±Π²Π°Π»ΠΎ Π΄Π° ΡΠ²ΡΡΡΠΈ ΡΠ°Π±ΠΎΡΠ°. ΠΠ°ΡΠΎ ΡΠ° ΡΠΈ ΠΏΡΠΊ ΡΠ΅Π·ΠΈ Π·Π΅Π»Π΅Π½ΠΈΡΠ΅ "Set..." Π±Π»ΠΎΠΊΠΎΠ²Π΅, ΡΠΎ ΠΌΠΎΠΆΠ΅ ΠΈ Π΄ΠΈΡΠ΅ΠΊΡΠ½ΠΎ Π² Buy now, Sell now Π΄Π° ΡΠ΅ ΠΏΠΈΡΠ΅ ΠΈΠΌΠ΅ΡΠΎ Π½Π° Π΄Π²ΠΎΠΉΠΊΠ°ΡΠ°

-
RE: Distance less than certain amount of timeposted in Questions & Answers
Distance less than 10 candles, what is that means? This blocks check the vertical distance, prices, how 10 candles fit in this picture?
-
RE: ΠΠΎΠΌΠΎΡ Π·Π° ΠΠ ΠΏΡΠ΅ΡΠΈΡΠ°Π½Π΅posted in Questions & Answers
Π‘ ΡΠ΅Π·ΠΈ Π³Π»ΠΎΠ±Π°Π»Π½ΠΈ ΠΏΠ°ΡΠ°ΠΌΠ΅ΡΡΠΈ Π΄Π΅ΡΠΎ ΠΌΠΎΠΆΠ΅Ρ Π΄Π° Π³ΠΈ Π²ΠΈΠ΄ΠΈΡ ΠΊΠ°ΡΠΎ Π½Π°ΡΠΈΡΠ½Π΅Ρ F3 - ΡΠ΅ ΡΠ° Π·Π°ΠΏΠΈΡΠ°Π½ΠΈ Π½ΡΠΊΡΠ΄Π΅ Π²ΡΠ² ΡΠ°ΠΉΠ» ΠΎΠ±ΡΠΎ Π²Π·Π΅ΡΠΎ ΠΈ ΠΌΠΎΠ³Π°Ρ Π΄Π° ΡΠ΅ ΡΠ΅ΡΠ°Ρ ΠΈ Π·Π°ΠΏΠΈΡΠ²Π°Ρ ΠΎΡ Π²ΡΠΈΡΠΊΠΈ Π΅ΠΊΡΠΏΠ΅ΡΡΠΈ. ΠΠΎ ΠΏΡΠ΅Π΄ΠΏΠΎΠ»Π°Π³Π°ΠΌ ΡΠ° ΠΏΠΎ-ΡΠΊΠΎΡΠΎ Π·Π° ΠΏΡΠ΅Ρ Π²ΡΡΠ»ΡΠ½Π΅ Π½Π° Π½ΡΠΊΠ°ΠΊΠ²Π° ΠΎΡΠ½ΠΎΠ²Π½Π° ΠΈΠ½ΡΠΎΡΠΌΠ°ΡΠΈΡ, Π½Π΅ Π·Π° Π½ΡΠΊΠ°ΠΊΡΠ² Π²ΠΈΡΠΎΠΊΠΎΡΠΊΠΎΡΠΎΡΡΠ΅Π½ ΠΎΠ±ΠΌΠ΅Π½. ΠΠ½Π°ΡΠ΅ Π²Π΅ΡΠΎΡΡΠ½ΠΎ ΠΈΠΌΠ° ΠΏΠΎ-Π΄ΡΠ»Π±ΠΎΠΊΠΈ Π½Π°ΡΠΈΠ½ΠΈ ΠΊΠ°ΡΠΎ Named Pipes ΠΈΠ»ΠΈ Winsock... Π½ΠΎ ΡΠΎΠ²Π° ΡΠ° ΠΏΠΎ-Π΄ΡΠ»Π±ΠΎΠΊΠΈ Π²ΠΎΠ΄ΠΈ

-
RE: Printing Group # and/or other textposted in Questions & Answers
To print group number (which is related to the magic number, read about it in the help or somewhere in the forum) you first need to select the trade or order (with "For each Trade" for example, read it's description for more info). Then there is a block "Comment on chart" where you can load multiple values to print right on the chart, and Group number also - somewhere in the pink category that starts with "(in loop)...".
For text... also "Comment on chart" if you want it on the chart.
I can also suggest "Indicator tester" block to backtest various numeric values. -
RE: Convert mq4 to mq5?posted in Questions & Answers
MT5 is from 2010 and it still cannot beat MT4 because of this problem and also because MQL5 is not as simple as MQL4. I also noticed that MT5 in visual mode is slow, I don't know why.
Now the new MQL4 is similar to MQL5, I think they added possitives from MQL5 to it and in backtesting MT4 600+ should be faster than older versions. If you are still on version 509, get the latest version, this is first. I don't know about the processor, I have normal processors here
I can suggest how to speed up the process of generating ticks data. Well, I'm not aware if Tickstory or something like that can be used to skip this process, but in any case now there are SSD hard drives which are faster than normal HDD. SSD have their problems as well - they have limited write cycles and MT4 can only make their life shorter, but there is something even more faster - the RAM
If you have more RAM (I think 4GB is small amount of RAM these days) you can create what is called Ramdisk and to read/write files from there with amazing speed. -
RE: Convert mq4 to mq5?posted in Questions & Answers
The biggest problem is that MT4 works with multiple trades and MT5 works with a single position per market. Not even a month ago MQL5 had more features, now MQL4 is almost like MQL5, but that trades-position difference remains, and that difference leads to different strategies basically - the same strategy will not work the same way in MT4 and MT5. That's why I keep MT4 and MT5 separate
Otherwise in the code I tend to make everything to look similar, if possible. -
RE: reverse sent orderposted in Questions & Answers
There are at least 2 ways to do that. In "on Tick" only or using "on Trade". In "on Trade" you can detect when a trade hit SL or TP (and then do what's needed). But "on Tick" is always better, where you can check the profit and the type of the last trade... if that fits the idea. Well, here is a little problem, a trade can hit SL and still be profitable (if SL was moved on profit). Maybe I should think for a block to check how exactly the last trade was closed (by SL, by TP)

-
RE: ea opens a lot of ordersposted in Questions & Answers
Because "Check trades count" goes to one output when there is 1 trade and to the other output otherwise. I guess you got many sell trades and buy pensing orders and 1 buy trade and 1 sell pending order. Π’his combination of blocks is inappropriate, maybe you have to use two "brown" blocks, each one set to Buys or Sells.
-
RE: Forum user new EA ideaposted in Questions & Answers
In "Buy now" (for example) click up where "Group and Market to use" is and you will see where to put the market name. You can use 2 blocks for both pairs. There is another way using "Set Current market for next blocks"... you can read it's description. Note that MT4 can't backtest multiple pairs at once, only the current one, or at least this was true before version 600

-
RE: ΠΠΎΠΌΠΎΡ Π·Π° ΠΠ ΠΏΡΠ΅ΡΠΈΡΠ°Π½Π΅posted in Questions & Answers
ΠΠ° ΡΠ΅ΠΎΡΠΈΡ ΠΌΠΎΠΆΠ΅ Π±ΠΈ, Π°Π· Π·Π°ΠΌΠΈΡΠ»ΡΡ ΡΠ°ΠΊΠΈΠ²Π° Π½Π΅ΡΠ° Π·Π° MT5 - Π΄Π° ΡΠΈΠΌΡΠ»ΠΈΡΠ° ΠΌΠ½ΠΎΠΆΠ΅ΡΡΠ²ΠΎ ΠΏΠΎΡΡΡΠΊΠΈ ΠΊΠ°ΠΊΡΠΎ Π΅ Π² ΠΠ’4. Π’Π°ΠΊΠΎΠ²Π° Π½Π΅ΡΠΎ Π΄Π°ΠΆΠ΅ Π½Π΅ ΠΌΠΈ Π΅ Ρ ΡΡΠΌΠ²Π°Π»ΠΎ Π·Π° ΠΠ’4.
-
RE: reverse sent orderposted in Questions & Answers
By definition Martingale (this is betting system) is when you double after loss and set to initial after win. I plan to add this MM in Buy now, Sell now, but at the moment it is in independent block. Well, using some variables it can be acheived with Buy now, Sell now. But if you really need Martingale, I think these block will be enough... until you get tired of trying to make Martingale to work without blowing the whole account

-
RE: ΠΠΎΠΌΠΎΡ Π·Π° ΠΠ ΠΏΡΠ΅ΡΠΈΡΠ°Π½Π΅posted in Questions & Answers
ΠΠ°ΠΊΠ²ΠΎ ΠΎΠ±ΡΠΎ ΠΈΠΌΠ° ΠΌΠ°ΡΠ°Π±ΠΈΡΠ°Π½Π΅ΡΠΎ, ΡΠΎ Π½ΡΠΌΠ° Π½ΠΈΠΊΠ°ΠΊΠ²ΠΎ ΠΎΡΠ½ΠΎΡΠ΅Π½ΠΈΠ΅ ΠΊΡΠΌ ΠΏΠ°ΡΠ°ΠΌΠ΅ΡΡΠΈΡΠ΅ Π½Π° ΡΠ²Π΅ΡΠΈΡΠ΅. ΠΠΊΠΎ ΠΈΠΌΠ°Ρ 900 ΡΠ²Π΅ΡΠΈ Π½Π°ΠΌΠΈΡΠ° ΡΠ΅Π½ΡΡΡΠ° ΠΌΠ΅ΠΆΠ΄Ρ Π½Π°ΠΉ-Π²ΠΈΡΠΎΠΊΠ°ΡΠ° ΠΈ Π½Π°ΠΉ-Π½ΠΈΡΠΊΠ°ΡΠ°, Π½Π΅Π·Π°Π²ΠΈΡΠΈΠΌΠΎ Π΄Π°Π»ΠΈ Π² ΠΌΠΎΠΌΠ΅Π½ΡΠ° ΡΠ° ΡΠΈ Π½Π° Π΅ΠΊΡΠ°Π½Π° ΠΈΠ»ΠΈ ΡΠ° Π½ΡΠΊΡΠ΄Π΅ Π½Π°Π·Π°Π΄. Π£ΠΊΠ°Π·Π°Π½ΠΈ ΡΠ° 900 ΡΠ²Π΅ΡΠΈ, Π·Π½Π°ΡΠΈ Π°ΠΊΠΎ Π³ΠΈ ΠΈΠΌΠ° ΡΠΈ Π³ΠΈ ΠΈΠ·ΠΏΠΎΠ»Π·Π²Π°, ΡΠΎΠ²Π° ΡΠ° 15 ΡΠ°ΡΠ°. ΠΡΠΎ ΠΏΡΠΈ ΠΌΠ΅Π½ ΠΊΠ°ΠΊΠ²Π° Π΅ ΠΊΠ°ΡΡΠΈΠ½ΠΊΠ°ΡΠ°: http://prntscr.com/2u17wz ΠΠ°ΠΏΠΎΡΠ²Π° Π΄Π° ΠΏΠ°Π΄Π° ΡΠ»Π΅Π΄ ΠΊΠ°ΡΠΎ Π²ΠΈΡΠΎΠΊΠΈΡ Π²ΡΡΡ Π² Π»ΡΠ²ΠΎ ΡΡΠ°Π½Π΅ ΡΠ²Π΅Ρ Π½ΠΎΠΌΠ΅Ρ 900+, ΠΏΡΡΠ²ΠΎΠ½Π°ΡΠ°Π»Π½ΠΎ ΡΠ°ΠΌ Π΅ Π²ΡΡΡ Π°. ΠΠ°ΠΉ-Π½ΠΈΡΠΊΠ°ΡΠ° ΡΡΠΎΠΉΠ½ΠΎΡΡ ΠΌΠΈ Π΅ Π³ΠΎΡΠ΅ Π΄ΠΎΠ»Ρ Π΅Π΄Π½Π° ΠΈ ΡΡΡΠ°.
-
RE: ΠΠΎΠΌΠΎΡ Π·Π° ΠΠ ΠΏΡΠ΅ΡΠΈΡΠ°Π½Π΅posted in Questions & Answers
Π’ΠΎΠ²Π° Π»ΠΈ Π±ΠΈΠ»ΠΎ... ΡΠ°ΠΌΠΎ ΡΠ΅ Π°Π· ΡΠ΅Π³Π° ΡΡΡΠ±Π²Π° Π΄Π° ΠΈΠ·Π»ΠΈΠ·Π°ΠΌ ΡΠ΅ ΠΈΠΌΠ°ΠΌ Π½Π΅ΡΠΎ Π΄Π° ΡΠ²ΡΡΡΠ°, ΡΠΈ Π°ΠΊΠΎ ΠΈΡΠΊΠ°Ρ ΠΏΡΠΎΠ±Π²Π°ΠΉ Π΄Π° Π²ΠΈΠ΄ΠΈΡ Ρ Indicator tester ΠΊΠ°ΠΊ ΡΠ° Π½ΠΈΠ²Π°ΡΠ°, Π°ΠΊΠΎ Π½Π°ΠΌΠ΅ΡΠΈΡ Π½ΡΠΊΠ°ΠΊΠ²Π° Π³ΡΠ΅ΡΠΊΠ° Π² ΠΈΠ·ΡΠΈΡΠ»Π΅Π½ΠΈΡΡΠ° ΠΏΠΈΡΠΈ. ΠΠΎΠΆΠ΅ Π΄Π° ΠΈΠΌΠ° ΠΏΡΠΎΠ±Π»Π΅ΠΌ Ρ ΡΠΎΠ²Π° 900, Π½Π΅ Π·Π½Π°ΠΌ Π΄Π°Π»ΠΈ ΠΈΠΌΠ° Π½ΡΠΊΠ°ΠΊΠ²ΠΎ ΠΎΠ³ΡΠ°Π½ΠΈΡΠ΅Π½ΠΈΠ΅, Π½Π°Π»ΠΈ ΠΈΠΌΠ° Π΅Π΄Π½ΠΈ Π½Π°ΡΡΡΠΎΠΉΠΊΠΈ Π·Π° Π±ΡΠΎΠΉ ΡΠ²Π΅ΡΠΈ Π½Π° Π³ΡΠ°ΡΠΈΠΊΠ°ΡΠ°.
-
RE: reverse sent orderposted in Questions & Answers
Martingale?
There are blocks able to control lot size by themselves (search for martingale in the search field). To control type of trades - sell, buy, sell, buy - it depends, you can check what was the last trade (category "Checkup") and open the opposite. -
RE: ΠΠΎΠΌΠΎΡ Π·Π° ΠΠ ΠΏΡΠ΅ΡΠΈΡΠ°Π½Π΅posted in Questions & Answers
ΠΠ΅ Π²ΠΈΠΆΠ΄Π°ΠΌ Π½Π΅ΡΠΎ Π΄Π° ΠΎΠ³ΡΠ°Π½ΠΈΡΠ°Π²Π° Π»ΠΈΠ½ΠΈΠΈΡΠ΅, ΠΏΠΎΠ΄ "on Tick" Π½Π° Π²ΡΠ΅ΠΊΠΈ ΡΠΈΠΊ ΡΠ΅ ΡΠ΅ ΡΠ΅ΡΡΠ°Π΅ ΠΏΠΎ Π΅Π΄Π½Π° Π»ΠΈΠ½ΠΈΡ ΠΊΠ°ΠΊΡΠΎ ΠΈΠ·Π³Π»Π΅ΠΆΠ΄Π°. ΠΠΎΠΆΠ΅ Π±ΠΈ Π½Π΅ΡΠΎ ΠΊΠ°ΡΠΎ "Once per bar"?
-
RE: Manager for tradeposted in Questions & Answers
Yes, at the end the magic number must be the same, it is always specified. Even for manual trades and orders it is some value - 0. Look here: http://fxdreema.com/documentation/proje ... d%20groups
Normally EAs work on every tick, this is "on Tick" in fxDreema. "on Trade" is not native for MQL4, I added some functions to create this trick. Use what will do the work. -
RE: NO TRADE IS RUNNINGposted in Questions & Answers
Bu default it works for the current currency only, for example EURUSD. See that "Market mode" option. You can specify multiple markets like this "EURUSD,GBPUSD,USDJPY" in the Market input field and it should consider those.
-
RE: Swing Trade EA using Heikin Ashiposted in Questions & Answers
I'm not sure if this is a good idea. To break even first you need to detect when the trade is profitable enough to be locked, this information should be kept in an array, and it's nearly impossible to work with arrays in fxDreema. Well, "Once per trade/order" does that in a way, it keeps some data in it's own array.