What's the simplest and best way to verify that a Buy or Sell was successful?
Posts made by richard96816
-
Best way to confirm Buy/Sell was successfulposted in Questions & Answers
-
RE: Renko working kinda... 2 pair of eyes cant hurtposted in Questions & Answers
Just a guess ... try Filter by Age in the Close trades block.
Put in a delay before close. -
Automate risk control with multiple EAs on one accountposted in General Discussions
Seems like there are a lot of ways to do this. A clean, automated solution would be nice.
Let's say you want between 5 and 20 or so EAs on your account. Pulling them in and out as they stop producing, etc. How do I enforce a level of overall risk while adding and removing EAs? EAs reducing lot size and even skipping trades as necessary.
Automated and least messy.
Thanks.
-
RE: "Write to file" blockposted in Questions & Answers
Write to file was recently upgraded.
You might want to delete the file you have and try again.
Make sure the append option is set properly. -
RE: Risk % of Free Margin - sometimes calculates incorrectlyposted in Questions & Answers
It sometimes calculates 'incorrectly' on purpose.
The % risk trade sizing code does have undocumented but apparently intentional situations where it violates the user's selected setting and trades above the stated percentage. (A somewhat dangerous prospect.)
Perhaps that is involved in this problem.
Would be nice if such things were documented and/or user selectable.
-
Handling Buy and Sell errors?posted in Questions & Answers
Buy and Sell blocks have success and error outputs. How do you use the error outputs?
How does the EA figure out what the error was.
Are there error handling blocks somewhere?Does anyone have examples of using the error outputs from Buy and Sell?
Thanks!
-
RE: Sell now bugposted in Bug Reports
@ambrogio I didn't mean to seem overly negative, just constructive.
I wish more folks would report bugs rather than just working around them. We're the testers. If we don't share what we see then the product will never get better.
Thanks again for your help.
-
RE: Sell now bugposted in Bug Reports
@ambrogio I don't see any accounting for stop-loss in your scenario. There are other things missing too, I think.
-
RE: Sell now bugposted in Bug Reports
@ambrogio Thanks for your response.
I'm using the Risk % of Margin feature in the Buy and Sell blocks. That's one of the main reasons for using a system like fxDreema. I can and have written all that stuff myself, but it's messy and unnecessary if the one in this system does the whole job.
It admittedly buries lots of details, but that's what you want. An assurance that all issues surrounding correct risk assessment and order placement are handled. MT4 has a single function call to check for sufficient margin. But you can't use it very effectively with fxDreema's Buy now and Sell now unless you duplicate almost everything they do. It's all buried and you only get to see the results.
Do I need to write my own Buy/Sell now? I consider it the core of the system and its correctness to be more important than almost anything else.
The fact that users are simply programming around these bugs is not a good sign.
-
Sell now bugposted in Bug Reports
I'm testing a bunch of EAs in a small live account and encountered a problem with Sell now. It apparently doesn't check to see if there's enough free margin before placing a trade.
With a number of already open positions I started getting emails on MT4:Subject: Trade could not be completed due to Insufficient Margin
Failed Trade: Type: SellMarket Symbol: EURJPY Units: 1000That message was sent four times, probably because Sell now tried to place the order repeatedly.
After a few minutes one of the previously open positions from another EA was closed and margin was freed up. Then three EURJPY orders opened, presumably from the earlier attempts. Not good, especially on a FIFO account.Would it be possible to have Buys and Sells check margin before placing an order? And perhaps check any error returns so unintentional orders aren't opened?
Triggering error messages from the broker is probably never a good thing.
Thanks
-
on Init and on Trade tooposted in Questions & Answers
I want to display the number of trades, etc., for this magic number on the chart. Currently I compute and display it both places, on Init and on Trade so it stays up to date.
Is there a way to call the same code from both places so I only need to update one place when I make changes?Thanks
-
Comment Label overlaps Valueposted in Questions & Answers
How do you keep the Comment Label from overlapping the Value?
-
History Loggerposted in General Discussions
Here's my history logger. A little messy but it works. Still can't seem to get it to work on MT5 though.

It writes the whole history to file when you start it and re-writes every time a trade closes.
Great for looking for good performing EAs on demo.https://fxdreema.com/shared/moX1emVJc
I have a Perl script for parsing it with.
Edit: The logger appears to have a strange bug. Each time it writes out the trade history it seems to include the data from the previous loop. So each time it triggers the written file grows by the size of the whole trade history. With still only one header. Very strange.
-
RE: Is Server Time = MT4 Platform Time?posted in Questions & Answers
GMT is the same no matter where you are. Seems like a much better choice for automated trading and discussing things with others around the world.
-
Change semi-colons to commas in Write to fileposted in Questions & Answers
How do I change the semi-colons to commas in Write to file output?
Also, can I get rid of the two extra fields at the beginning of each record, Time (local) and Time (server)?
Thanks
Edit: Write to file sends lots of duplicates of all trades to the file. Would be nice to clean that up too.
-
RE: More Columns in Write to File blockposted in Questions & Answers
Yes, it would be very nice to have a few more columns on Write to file.
I've been looking at working around the 10 item limit, but it's very messy. I'm doing lots of logging and analysis that's really paying off, but need a few more items.
Trade/Order in Loop has 15 items and many of those items have 5 sub-selections each.
Thanks
-
Change a script into an indicator?posted in General Discussions
I have a small script that writes trade history to a file. I'd like to turn it into a Metatrader indicator so it can hang around and write out new trades as they happen. One copy per terminal.
How do I make an fxDreema script appear to Metatrader as an indicator?
Thanks
-
RE: Opens at first but none after... Help plzposted in Questions & Answers
@alexanderjohnson21 Take another look at the tester log for clues.
-
RE: Maximizing Profitsposted in General Discussions
@andermaiden2nd Thanks for the response.
- I've learned that basing everything on fxDreema's Once per bar makes it so you never need ticks again. When I test with ticks after optimizing with Open prices only the difference is often less than a dollar, net profit (<1%). Ticks are not necessary. Even with one minute charts, which is my preference. Buying tick data is simply unnecessary.
Besides, external data is not compatible with your broker. The only data to use is your broker data. And maybe not even demo data. One of my brokers demo data differs from live. The other, forex.com, is solid -- demo and live are exactly the same. So far, anyway.
I can't image getting away with using anything but your particular broker's data. This is not the stock market. Read your contracts. They reserve the right to modify the data, and they do, big time. - fxDreema rounds UP after computing lot size if the result is less than 0.01. So if you plan on filling up an account with EAs and relying on fxDreema to compute lot size, expect margin calls. Or be sure to oversize your account or put manual limits on your EAs.
When you hit your margin limit and several EAs try to open trades they'll bust your limit.
Your broker will be taking your money. So be careful.
The round up is apparently a feature having to do with too many new users not getting any trades.
I've had three EAs round up simultaneously on demo, that's how I found out about it.
- I've learned that basing everything on fxDreema's Once per bar makes it so you never need ticks again. When I test with ticks after optimizing with Open prices only the difference is often less than a dollar, net profit (<1%). Ticks are not necessary. Even with one minute charts, which is my preference. Buying tick data is simply unnecessary.