@l-andorrĂ I am sorry that I did not answer you earlier but I think I have found the logic in the For Each Object loop. You can nest multiple For Each Object loops into another and the loop is always empty and exited. It exits the loop via the yellow dot when the tasks for each object are done via the red dot. If there are no objects on the chart that meet the filters in the for each block, the loop will always exit via the yellow dot. This allows you to count the number of objects on the chart, check if, for example, a rectangle from another timeframe is inside a rectangle on another timeframe etc. I have added a screenshot of what I have now been able to produce using FXDreema: my version of SMC I have used for manual trading
Best posts made by fxpim
-
RE: How to break or next an object loop?
-
RE: How to break or next an object loop?
@GeoFX I think I can explain by now. What you need to do is the following: take a For Each Object loop and store all of the variables you want to check against another object. For me, that would be the upper and lower price coordinates and the beginning of the rectangle. After storing these variables, connect another For Each Object loop to the block that stores the variables and take the condition blocks to check the object of the second loop against the variables you stored in the first loop. The picture shows the block's structure.
So basically: first object loop -> store object variables -> connect second loop -> use condition blocks to check the object properties against the variables you have just stored -> object action for the object of your second loop
Latest posts made by fxpim
-
RE: Multiplier lot size based on trade count
Store the base lot size in a constant input and copy the input into a variable. Use that variable for the lot size of the next trade. After every execution, multiply this variable by 2 and let the next execution use that variable for the upcoming lot size.
-
RE: Compiler is timing out?
How many times did you compile a project? I sometimes get a 429 on FXDreema because I disconnect too many blocks in a certain time interval. I contacted the admin about this; it is one of the security measures he took after the hack. Maybe this is the case for you as well.
-
RE: Position Count Not Working
There will be a moment where you will have 1 open position. It's the moment in between having zero or one position and the moment when the second position is opened. I guess that this block structure is triggered once per tick. If so, first run the block structure that checks whether you have two positions and then the block structure whether you have one position.
-
RE: How to wait 1 bar
Can you provide the context in which you want this to build? It can be done in several ways but we need to have the context to do it the right way.
-
RE: Second condition not triggering
just tested it and it works for me. I get one buy and one sell at a time. The only thing I don't get is why you would want to close the trades at the end time and immediately after closing those trades, open new trades again.
-
RE: Block "Order Moved" not working.
@mariussun Do you move the order manually? If so, you should e-mail the admin because I agree that your logic is correct for this problem. However, I would move the blocks from On TImer and On Chart to the On TIck tab.
-
RE: Second condition not triggering
@Moneyman012 If you want one trade at a time, no matter buy or sell, you should filter either buys or sells in the no-position block. I've already fixed it in the shared project you just shared in your last reply.
-
RE: Second condition not triggering
@Moneyman012 Yes, click the shared project link you shared on this topic.