And how many open trades can the bot have at the same time? Do you need that 'global' profit to be 100 pips combined?
The inner workings of "check profit average"?
-
I've been reading all your comments and thought you're going where I want but unfortunately not
I thought this person wanted to close trades after gaining 100 pips in a week, that's is to say from the beginning of trading calculate losses and see if you're currently 100pips higher then close all trades and begin again. This way if you made 200pips losses on Monday you might have to make 200pips wins to replace the losses then 100pips again to gain profit.
If this is not what he said , please help me achieve that, I do not have time frame to gain that.
- 8 years earlier
-
Hi,
I have attempted to program my EA to "once per bar" - "check profit average" and if the profit is greater than 100pips then to close all trades. 100 pips is my target for the week and by using the "once per bar" I essentially want the EA to wait for the bar to close, then check profit average, then close out.
This is currently not functioning for me and I suspect it has to do with the "check profit average" block. In the Trades pool field I have running & history trades selected. Now my thinking was that the EA would average my profit from when it was initialized (eg Monday) but this assumption looks to be wrong. Do you know, is the EA looking into my previous MT4 trade history? and therefore was including trades in the average from previous weeks?
Can you please provide me with some guidance on how I could check the average profit for the current week only?
Any ideas would be greatly appreciated.
Thanks Phil.
-
100 pips per week does not sound like something that can be described with the word "average" to me. Try "Check profit (period of time)" instead. By the way, I forgot the meaning of its parameters, I guess I should think about more descriptions
But maybe it would be tricky to set Monday-to-Friday in this particular block. I can also suggest to try Bucket blocks, note that in "Bucket of Closed Trades" you can specify these times in various ways
-
Thanks for your reply. You are absolutely correct, check profit average is not the right block. Check profit period of time is the block I should use.
A couple quick question on using this block (check profit period):
If I use this block with no time period selected, but instead use the once per bar time filter to precede this block. Will the EA check the "total value (sum)" of all trades since the EA was initialized (once per bar)?
How does the time period section of this block work? And how do I reference the week day shift? do I reference Monday with a number or do I use the word?
I appreciate your help.
Phil -
You can have trades closed years ago. Who cares about these long forgotten trades. You want to work with relatively new trades and the first time sets the oldest trade possible. For example, you may want to select only trades closed in the past 5 days, not anything older than that.
I made this block because many people wanted to know what was the profit of the current day. How can you know this... by looking at all the trades existed after 0:00 of the current day.
Once per bar only prevents the next block in the chain to run on every tick. Instead, it runs maximum one time for each bar. This block has no opinion about the work of any other block, it just limits their execution.
-
Thanks for your reply.
I have mad some progress using the "check profit (period of time)" block, I have grouped all my trades and then asked the block to check the sum of profits for that group and have just ignored the time portion of the block. This solution seems to be working very well, however, I have found another road block.
The "check profit" period of time block seems to be summing the profits as it says but is ignoring their relationship to the losses.I want to sum profits & losses, eg. total net profit, not just the profits in isolation. Is this block capable of summing profits & losses or should I look for another block to perform this function?
Phil.
-
This block sums OrderProfit() + OrderCommission() + OrderSwap() of the trades. OrderProfit() can be positive or negative. Yes, there is "profit" in the name of the block, but this does not mean that it skips losses.
-
Thanks for clarifying.
Phil.
- 8 years later
-
@KABO But what do you need exactly?
- 10 days later
-
@l-andorrà i want my take profit to remain at 100 pips and close trades once i hit that, but if it doesnt and hit my 50pips stop loss, i want my next tp to be adjusted to 150 pips so that i cover the previous loss of 50 pips.
-
And how many open trades can the bot have at the same time? Do you need that 'global' profit to be 100 pips combined?
- about a month later
-
@fxDreema But learnt it only works on the first tick of the day. After the first tick it doesn't check for such loss limit again??
-
I see you already asked this on the thread you created. Please don't duplicate questions on different threads.