@kop Is that real program logic or art? Do you expect a valid answer from just sharing the screenshot?
Posts made by trader.philipps
-
RE: partial closing of dealsposted in Questions & Answers
-
RE: how to make 3 ema 10,20,50 program.posted in Questions & Answers
@herviejao It is not a common case that all 3 EMAs cross in the same candle. I think you need to specify the conditions more precisely. And please share your project with what you have already!
-
RE: Manually Opened Trades (SOLVED)posted in Questions & Answers
@indaplace2be I didn't get when you want to set SL and TP and if the trades were opened by EA or manually. However, in general it should work like this

Please note the both Adjust fields. Here you'd use a multiplicator variable (if applicable)
Does that help?
-
RE: FTP not working for \File sub foldersposted in Bug Reports
@camhawk Okay, created a testing project. The right way is folder\filename.txt
For debugging see error codes for last error here: https://docs.mql4.com/constants/errorswarnings/errorcodes
Do you have any blanks in file or foldername?
-
RE: Tutorial Expert Advisor with some recent issues solvedposted in Tutorials by Users
@fabien-s Testing on demo now. But without back testing it's hard to do. And there are a bench of errors in the log from it.

So maybe I need to rethink the entire thing. If it's not possible to integrate it as a usual indicator in fxdreema, there's only the option with the global variables. But so far I didn't produce news events for all, but just 1 pair from the market watch.
-
RE: Script or EA that opens a pending trade at the price of a horizontal line.posted in Questions & Answers
@cllatser I do something similar in my tutorial EA I published here last weekend. I set TP level and pick them up on the on Init tab. You may have a look there or share your project here.
-
RE: all my stops set to 48.01posted in Bug Reports
@simonsavva As long as you are the only one facing this issue it is probably more related to how you set those stop if they're not static.
Can you provide more information or share your project? -
RE: Selective multi currency EAposted in Questions & Answers
@kop That would mean that you trade all the stated pairs within the EA. For simple strategy that might work well, but with more complex ones probably one have to be very certain what EA will do when.
@christarola The alternative would be, that if one prefers 1 EA instance per chart, to update global variables on each transaction such as trade open and trade close (pending orders would special to take into consideration). Assuming you create a global variable called EUR and one USD. In case of a EURUSD trade, you would set both variables to 1. If that trade is closed you would set it to 0.
Berfore opening a EUR or USD related trade you might check before opening if the global variable is < 1.
There are some pitfalls regarding trading actions such as close trade when EA casely or or not is not active.An easy way to extract the currencies involved is using the marketinfo data like this ...

-
RE: FTP not working for \File sub foldersposted in Bug Reports
@camhawk Haven't used that block, but did you try forward slash "/" instead of back-slash?
-
RE: partial closing trades and moving slposted in Questions & Answers
@kop May you share your project?
-
RE: Why code blocks get executed on on Tick tab but not on on Timer tabposted in Questions & Answers
@trader-philipps Okay, I digged deeper into this. It looks like the time is interpreted correctly, but the news are downloaded each day from the current week. So it seems to be an issue with NewsInfo and/or the data provider. I opened a ticket at blackmoonfx or however they are called now. Let's see if there'll be an answer.
If someone uses this indicator already in live account, he might check the cache folder if there are some news files and provide them. So I think I could do some more testing and development. -
RE: Blocks does not work please helpposted in Questions & Answers
@temuriy Hard to tell. May you share your project? Looks a bit weired anyway. Maybe you also describe what should happen.
-
RE: Why code blocks get executed on on Tick tab but not on on Timer tabposted in Questions & Answers
@ambrogio Well, so far I am struggling with it as well. The icefx offers a solution to do this. And (if nit in tester) the approach really works. The manual says ...
The program provides an opportunity to display news in the appropriate moment in “Backtest
mode”. To use this feature Expert Advisor (EA) running in “Backtest mode” has to be able to pass
directly the current time in backtest (backtest time) to the indicator. To do this, any Expert Advisor
(EA) has to put the current time to global variable called ”NEWS_EURUSD_TIMEOVERRIDE”
before calling the indicator (EURUSD indicates the currency pair in the test). The program will read
this value and displays the news accordingly.So, if you do so in normal mode, it really works. Set a global variable with a unix timestamp of your choice and than drag the indicator on the chart and it displays the comming up news according the the indi settings. But if I set the global variables in tester with fxdreema, the indicator doesn't seem to realize the global variable.
Next approach I might use mql code instead of the blocks and check if they make a difference. -
RE: how do you use trailing take profit stop lossposted in Questions & Answers
@veetee said in how do you use trailing take profit stop loss:
Hi, I find your rrailing stop loss trailing take profit block confusing. Do you have any examples of how to use the various option in a practical situation?
Hehe, you're right, I was lazy when I did that and maybe over complicated thing. However, here's what I meant ...

(1) Calculate the ATR value from the candle the trade was opened. Here is a little glich as it should be 1 before the trade was opened. However, that's cosmetic. You may also use the current ATR value instead. But for tutorial, you may also calculate the ATR from a previous candle.
(2) The ATR value (price fraction) gets multiplied by the with the ATR SL multiplicator. So I set the new SL (trailing) as far away as the initial SL was.
(3) Trailing Step .. here comes the part when I was too lazy. Usually I would calculate the ATR value from (1) in a modify variables block and store the valuze in a variable. This time I did it a different way. I use % of SL. So in the default case the SL ATR multiplicator is 1,5 and the TP1 ATR multiplicator is 1. Hence trailing step would be 1/1,5 in percent which is 66%. This 66% from 1,5 times SL ATR is exactly 1 ATR. So the trailing step is 1 ATR (or equal to TP1 distance from open price)
(4) Trailing start .. same as before, just half the %. In this case 33% of Stop, which is iun our example 0.5 times the inititial SL ATR distance.
Does that make sense?
-
RE: Why code blocks get executed on on Tick tab but not on on Timer tabposted in Questions & Answers
@l-andorrà @ambrogio Thanks for your answers. Good to know that it works on demo/real, but I am working to make news available on tester

Need more investigation, but will go with the on tick tab for now.
-
Why code blocks get executed on on Tick tab but not on on Timer tabposted in Questions & Answers
It's really anoying! I'm searching and searching for the issue why my code is not executed. So I placed it on the on Tick tab and it worked fine. What do I have to configure that it works on on Timer tab?

Are there any secrets I'm missing?
-
RE: Symbol from market info without any pre- or suffixposted in Questions & Answers
@roar Okay, will dig deeper into it once news filter is working. Right now I just do this

Thanks a lot!
-
Symbol from market info without any pre- or suffixposted in Questions & Answers
Hi I'm currently trying to implement the icefx newsinfo indicator into the tutorial EA. According to icefx manual to make the indicator work in back testing, I need to create a global variable containing the current server time (bt time).
Example:”NEWS_EURUSD_TIMEOVERRIDE”In order to make this a bit more robust, I'd like to calculate the variable name. As it contains the current symbol name, I need it without any prefix or suffix.
@roar or @miro1360 any idea how to achieve that in an effective manner? Probably it needs some String operations. -
RE: How do I place a pending order for the last open position while removing the old pending order.posted in Questions & Answers
@khalids222 Is there more than 1 trade per direction possible?
-
RE: bucket tradesposted in Questions & Answers
@ajr Not quiet sure, but may work if you set EA magic number to 0. Would be worth a try.