Closing trade based off different indicator
-
Hi,
I am trying to close a trade when the Alligator indicator's "lip" crosses the "teeth". How can I close a trade based off an indicators signals?
-
Anyone have anything?
-
Try this if you want it to cross below:

-
Here's what I have - but it still isn't executing the close based off the indicator?
https://fxdreema.com/shared/nGhLSOoHd -
I notice you have two blocks one after another who have x< and x> inside. Take a look at how the crossover works in these blocks: https://fxdreema.com/tutorial/builder/crossover The problem when you have 2 crossovers in 2 blocks connected one after another is that it is expected the crossovers to be true at the same candle. When you are using different indicators, this is normally not the case. So, what you can do is to use just one crossover and use > or < in the other. The idea is that if line A is > line B now, then surely line B crossed line A some time ago. Maybe one candle, maybe 10 candles... the question is do you care how much candles.
If you still want to wait for one crossover to happen and then wait until the other, try this on the block you want to wait:
But even if this option looks promising, I found out that when I use it, I only get lost. If you resolve some problem with it, there is a chance to create some other issue. For example, what happens if certain block is waiting for its crossover to happen too long and meanwhile in the strategy you no longer want to create a trade 
-
I configured the crossing inputs; but I am still struggling to have any trades become closed based off an indicator signal. I'm sure it's something that I am not doing, but not having exit indicators has significantly tampered the results of my EAs so far.
Here is another example I have:
https://fxdreema.com/shared/p1vVNslHbAdmin, if you email me on my account email, I will send you inputs to strategy - it is not working properly.
-
I strongly recommend you to use the two step conditions crossing. One for candle ID 2 and the other for candle ID 1. IMHO this is the most efficient way to check for crossings.
-
You're referring to replicating the conditions where the first would be based off the cross of candle ID 1 and then the other pair of conditions would be based off the cross of candle ID 2?
Would you just do it for the crosses? Or for all the conditions do the same candle ID?
Do you see anything wrong with the closing perimeters? I have done the most basic form of closing indicators to test but I cannot seem to create the code to close at the right signal...
-
@zxcsmith94 said in Closing trade based off different indicator:
You're referring to replicating the conditions where the first would be based off the cross of candle ID 1 and then the other pair of conditions would be based off the cross of candle ID 2?
No. What I mean is that all crossings should be defined as I suggested in order to avoid problem like the one you described.
Would you just do it for the crosses? Or for all the conditions do the same candle ID?
Initially for all crossings only. Then backtest it and if the problem persists, then all conditions should be treated the same way.
Do you see anything wrong with the closing perimeters? I have done the most basic form of closing indicators to test but I cannot seem to create the code to close at the right signal...
You closings are wrongly defined. Both blocks can close buys and sells at the same time. On block should close buys only and the other one sells only.
Hope it helps
