Help With An OCO Order EA
-
Hey guys! I'm a bit stuck on this EA. My goal is to create an EA that opens an OCO order when the HMA Trend line changes colors, then after the trade is placed from one pending order, it places a specified amount of corresponding trades. After the take profit is hit on the trades, the loop at the end should close all the trades from oldest to newest. So far its been a battle to just get it to open the OCO orders. Can anyone help?OCO EA.mq4
-
@AlexisC25 Can you please share the link to the project instead of uploading the file?:

-
@l-andorrà hi! Sorry for the late reply. I kinda gave up on that one, but I have another one I'm working on if you don't mind helping with it? It's really difficult to make a FiFo compliant ea with this lol
-
@l-andorrà here's the link to the shared copy of the New EA I'm working on! https://fxdreema.com/shared/3ptPXowfd
-
@AlexisC25 Ok. But what do you need now exactly?
-
@l-andorrà I'm stuck because it literally doesn't place any trades. I'm not really sure what I did wrong. The idea is to scalp with the fast HMA (HMA 1 open and close on color change/angle) but only in the direction of the main trend as confirmed by the Slow HMA. It uses the ADX to confirm trend strength. Somehow I messed it up and it's not placing any trades still. It also must be FiFo compliant so I've been trying to do that too.
-
I should also point out that if there is a trade opened, I don't want it to place another trade.
-
So I think I've completed it! Don't see a reason it shouldn't work now, but haven't tested it yet. Here's the link in case anyone wants it or I can upload it to MQL5 or something. https://fxdreema.com/shared/xPpCNLRM
-
I've also made a trade copier (same currency, same terminal) Essentially a trade multiplier! It detects the trade placed from a different EA on the same currency and places a specified amount of trades, then when the other EA closes the trade, it also closes the trades made by the copier in order from oldest to newest. Both EAs follow fifo rules as far as I know. Again still havent tested them but they were pretty easy to make once I explored the builder a bit more.
-
Trade Copier: https://fxdreema.com/shared/ByKlfqmXb
-
@AlexisC25 Gracias por compartir tu EA, seria super genial si compartes un video explicandonos como funciona, esto de la copiadora es un proyecto super interesante, estuve revisando el proyecto en fxdreema y no logro comprender como y donde ingresas los datos de la cuenta madre y de la o las cuentas que copian las operaciones... como se da el enlace exactamente? si es de forma remota o solo local?,, etc.
-
@DragonZueloTrends Hi! So because it would be on the same currency, the idea is that it should pick up on the trade. It should be on the same currency, different chart, same terminal. Not exactly sure if it works but it was just an idea! I'm still new at using the builder.

-
@AlexisC25 Ah comprendo, igual gracias por compartir, es mucho mas de lo que hacen muchos aqui... yo estoy intetando hacer un EA que filtre horarios de mercados de Asia, NY y Londres, para operar en la KILLZONE usando ITC y SCM
-
@AlexisC25 Thank you very much for sharing.
-
In most cases it is not wanted that the EA only checks the conditions once at the beginning of the new candle. Often it is wanted that several positions are not opened in a row. To do this you have to do this "once per candle" directly in front of the buy or sell order set
-
@RGoo Wouldn't that mean that it'll wait until the next bar to go through with the rest of the loop though? Could you please explain in a little more detail if you have time?
-
@AlexisC25 Backwards, at the top, means it will check once per bar before the next blocks, so any that are false means it will have to wait until the next bar to be checked again, at the bottom all blocks are checked, and then when all are true, once per bar is activated before blocks that are always true.
-
@jstap Oh! So should I do that with all of my projects then or is it just for this instance? Thanks for explaining!
-
It depends on whether you want a block only checked once per bar, or after something happens. I use both depending on what I want to happen.
-
@jstap Okay. So either way it wont hurt any logic, it'll help it pass through as needed. It won't effect any loops that need to pass a specified number of times either?
