trouble posting trades to telegram
-
Hi guys,
So, I'm trying to have my EA post to Telegram whenever a trades is opened. It kinda works, but not like I want it to. Please see the shared project.
https://fxdreema.com/shared/xeJW3oaZ
Only when I have blocks arranged exactly like this in the onTrade tab, will the EA post to Telegram. If I remove the Chart Screen Shot block (and change Run Blocks to 279) it won't work. If I arrange any other combination of any other blocks in any other tabs (I believe I've tried nearly everything) it won't work. Only like this will it work. But then, the EA not only posts to Telegram when a trade is opened, it also posts when I close the trade which I don't want it to.
Any help is much appreciated.
-
Did you try connecting block 289 to block 270 without using block 285? That should work fine. If it doesn't, the reason must be somewhere else. For example, I can't see how closing a trade should be connected to Telegram in your link. That means we are not seeing the whole project.
-
@arevald I did try that. It seems like the obvious thing to do but it doesn't work.
I don't see, either, why closing a trade would be connected to Telegram.
I've shared the whole thing. The turned off blocks are just code for some unrelated indicators.
The way I test wether the telegram posting works is I attach the EA and manually open and close a trade, so as not to wait for 24+ hours for each pending trade. It works if the blocks are connected as they are in the shared project, otherwise it doesn't. Pretty strange. Unless there's some bug in the code underlying fxdreema, which i'm not inclined to suspect.
Could some undeleted cache files be interfering, perhaps? I'm no computerwizard, so that's all I can think of. That, and me missing some other way of using and arranging blocks, ofcourse, which is probably the most likely explanation.
-
@arevald Ok, some development now.
I changed the block configuration to this:https://fxdreema.com/shared/tyNRlp53c
Now, the EA posts a telegram message (and takes a screenshot) when I attach it. I suspect that it sees that I already have a trade open at the time of attaching. However, when I then open another trade manually, nothing happens. No telegram message and no screenshot.
I'll wait now for the open trade to close (it is open now at this time of writing) and see what happens and then wait for the next trade to open and also see what happens.
What explains the EA's behaviour as described in my initial question, I have no idea.
If the updated EA - as linked to in this reply - takes screenshots and posts to telegram on the next trade close and the next trade open I may have some idea. I'll return that if it happens.
If, on the other hand, it still doesn't - except upon EA attaching as mentioned above - I still have no idea and the mystery will only have deepened.
-
@arevald
Ok, so the trade just closed and the EA took a screenshot and sent the correct message to Telegram. Cool.The idea I mentioned that I would return to is that maybe the EA doesn't send messages and takes screenshots upon manually opened and closed trades. It kinda looks that way with this configuration. Maybe it only does upon trades opened by an EA.
BUT the trade in question wasn't opened or closed by THIS EA, but by another I have running on a different chart.
Is there some built-in function that makes the EA distinguish beween manually and EA-opened trades by default (I know that such a function can be switched on in certain blocks, but I didn't do that)? And if so, why did the first iteration of the EA, the one I linked to in my original question, send messages on manually opened trades (and on closed, even though not configured to) which is what I used to test it?Still some mysterious things happening, but for now I have at least gotten the EA to do as I intended. So far....
Waiting now for the next trade to open to see what happens.
Will update...