Need Help With Open Trade
-
Hello,
So I manage to make my EA and it works as intended, but I don't seem to find any function to achieve this:Condition:
- The trade is open
- Check if the indicator has crossing
- Close trade and continue the algo
which combination of blocks I could use to achieve this?
Project: https://fxdreema.com/shared/CpXJ87DRb
Thanks
-
@slimmz What you have is what you need, x> is for when a ma crosses above another ma, X< for when it crosses below, you can put a close block before a buy/sell block to close sel/buy, this will happen on whatever candle ID you have chosen. You can also remake the tree starting with the condition block to just close.
-
Yes, that helps me,
now comes the other, how do I make sure that the trade is only executed if the indicator CROSSING each other? only when they CROSSING. Because on my current settings, while I backtested it, the trade was continuously executed even when the indicator wasn't crossing.
Whilst I only need them to be executed while only the indicator crossing
Like, if I start the EA, it will only scan for the indicator. And if they cross each other, the trade will be executed, if not, just keep scanning
and also, when trades are open, also do scan for indicator crossing, if happen, close current trades and open the new one, if not, just keep scanning.
How do i map this?
-
@slimmz Put an if trade at the top, this will limit to only one trade.
-
i mean, only do trade when the ma crossing, not by limiting the open trade
-
@slimmz I use the no trade block and then a group 2 etc trade to enter more if needed, a once per bat block will limit to only 1 trade per candle..
-
can you give me an example in shared project please?
-
https://fxdreema.com/shared/0HA8HwDwb
Im using this settings as i found in the tutorial page, but i still have issue with it
When there is an open trade, and then the MA crossing each other, the trade wont close, why?
-
@slimmz Try doing this, the logic here is if opposite trade close then open new. I have used this setup many times and does as expected, try this, you can also set up completely separate trees to close, if you still struggle post here.
-
@jstap Im still struggling with your instruction, no matter where i put the close trade block, it just won't do when the ma is crossing
can you please make it for me and share, so i can test yours and check does it error in my system or my logic
Im using 2 MAs, both smoothed with 4&26 period
if 4 crossing up the 26, close sell and buy
if 4 crossing down the 16, close buy and sellplease share how you make it here so i can test, cheers
-
Update:
I don't know what was wrong with my project, but then i copied the one from tutorial page and modify it on my project and now the EA running as intended
thanks for your support @jstap
-
@slimmz Your welcome