This depends, there are few cases. Depends on how you want to detect the line, thepends on what kind of cross is to be used. But in short, in "Condition" this can be found: http://prntscr.com/8mohoo
Posts made by fxDreema
-
RE: Help with Drow Lineposted in Questions & Answers
-
RE: One Take Profit by Periodposted in Questions & Answers
Try to put "For each Closed Position" above that "check how it was closed" and set it's "Not more than... " parameter to 1 (so only the very last closed trade will be selected).
It's a long story, but here is some explanation for these pink blocks (for MT4, but it's similar with MT5): https://fxdreema.com/demo/mt4-loop-how-it-works
-
RE: and/orposted in Questions & Answers
There is no OR here, but if you want OR, then make some connections in parallel
-
RE: Retrive the highest open price from a group of ordersposted in Questions & Answers
I think I'm gonna stop answering to question if there is no showcase included (simple project showing the problem directly). I'm really tired of imagining what exactly could be wrong

-
RE: Close the least profitable tradeposted in Questions & Answers
I think that you want to have a Script which will close the least profitable trade only when you run it manually. The difference between Expert Advisors and Scripts is that Scripts run only once, they do their job once and then they exit. But you should know that...
Or you want to break the loop (for loops this word is used), which means that you stop the loop in the middle and continue doing the next thing after it. Only for the pink blocks I have added such block and you can find it in the bottom of that category. But if in "For each trade" you have "Not more than n trades" set to 1, it will stop after the first trade in the loop anyway.
-
RE: reset in once a day ?posted in Questions & Answers
Pass once can pass only once, as it's name says, but if you want you can reset it with the Reset block that can be found in the same category. Of course it matters where the Reset block is placed!
"Once a day" under "on Tick" can be used to cause the reset block to run at 00:00 every day. Or combination or "Hours Filter" and "Once a day" blocks.
Note that Pass once has it's own memory and know whether it passed or not, but in case the EA is restarted, the block will be reset as well.
-
RE: One Take Profit by Periodposted in Questions & Answers
Here is some example by the way, a little bit advanced because small MQL4 code is used, but this is in fact more flexible: https://fxdreema.com/shared/Mnphpsdve
But I think that it will be best if I add some filter for the time directly in "Bucket of Closed Trades" -
RE: Undeclared compilerposted in Questions & Answers
I moved the definition of vsl and vtp up, before the loop. This is in a function called OrderCreate()
-
RE: One Take Profit by Periodposted in Questions & Answers
I will make some block tomorrow, because many people were asking for this and I'm tired of making examples using multiple blocks
-
RE: Reliable way to backtest demoposted in Questions & Answers
I don't know, to be honest. It looks that there is only one set of timeframes in the Tester and I don't know whether it can be changed. There are some annoying things... for example I wonder why it's not possible to not regenerate ticks on every backtest. Better ask Google

-
RE: fxDreema was updated... obviouslyposted in Questions & Answers
Interesting. I don't know why and I will check that later, but at least it looks that you can focus at the second line using right-click
-
RE: how to apply an indicator to another indicator?posted in Questions & Answers
I was looking at iMaOnArray(), but I don't think that it's a good idea to use it into an EA. This function does not change anything on the chart, it will not even create it's own Moving Average. This function just does some calculations in the code only. So, even if it works in the EA, there will be no visual representation of what is going on, no MA line will be created on the chart.
I was looking at some topic in mql4.com and there is a custom indicator that can be used as a template: http://forum.mql4.com/45803/page2#1010508
I know that this requires a little bit of programming, but at the end it will at least print the actual line and everything can be seen. -
RE: 8wma crossunder of 55wma, then withing 5bars, it crosses undposted in Questions & Answers
Two crossovers at the same time... I will suggest to use only 1, and the other condition to be <. So you will have:
Condition 1: MA8 x< MA21
Condition2: MA8 < MA55If MA8 is < than MA55 now, it crossed it below somewhere in the past candles for sure, otherwise MA8 would be above MA55.
-
RE: 8wma crossunder of 55wma, then withing 5bars, it crosses undposted in Questions & Answers
This Gyazo website looks broken to me

-
RE: Bucket of Tradesposted in Questions & Answers
I was waiting for the new version of the program I use to create the desktop version, they wrote that it will be out in October, but who knows... The current version has some problems that I wished to not deal with
