Cannot understand how to not let system take a trade unless 1st is not at risk
-
Hello!!
My first post and am enjoying this program.
The issue i am having is my system buys once a day. If the price moved a certain amount higher it closes half and then moves the SL up to breakeven on the second half. I have figured this part out. What i cant figure out is how to get the system to NOT take a second trade if the above process has not occurred.
For example, it buys, price falls. Next day it buys again. It should not buy because the first trade has not taken partial profits and has not had the risk reduced. Now i have two full trades at risk when there should only ever be one trade at risk.
Another issue i am having is the partial take profit only seems to take affect if the certain pip movement has taken place AND a new daily candle is opened. I kind of wanted it to take place as the data occurs, not just on the new candle.
Its probably pretty simple but this is only my second day and i could not find it searching

Thanks!
-
The first issue can be easily fixed by using a 'No trade' block on top of your launching structure. Teh second one will depend on your current project. Can you please share it?
-
Ahh thank you for assistance. I'm glad I do not need to code but understanding how this logic works is still a learning curve.
The goal is to only have 1 trade at risk at a time. If the partial profits have been hit and the SL reduced to BE or past it then its okay to take a second. Also, id like the partial profits to exist in real time, not just at the new daily candle.
Attached is the mq4. I haven't figured out how to post the project like i have seen on here...

-
I think i figured out the posting of it?
-
Never connect any block below buy/sell now unless it it for storing info into a variable. All blocks nelow them now need to be positioned in different block trees below a 'For each trade' block.
-
Okay got it. Changes have been made. Im not skilled enough yet for variables and constants and such. Still don't really get them....
Still cant figure out how to get it to only take another trade on the next day if the previous trade has been "derisked". If the position has not hit the partial take profit and risk been reduced to 0 I do not want it to take a second.
Also the function for the partial take profit only seems to work on the new daily candle. This is not idea. I would like to get it to work in real time.
Thanks for your assistance!
-
- Both 'close trades' blocks are closing buys and sells at the same time whereas they are connected to buy only /sell only trees. They should be coordinated.
- Blocks 18 and 19 are messing things up. You shouls create a new tree headed by a 'For each trade' block in which conditions for the 'derisked' trades should be connected to it. And then the current 'modify stops' block.
- You will need a 'No trade' block on top of blocks 9 and 24. Otherwise a new trade will be open every day.
-
I figured it out! Thanks. I just need to play with this program more to get the hang of it and build knowledge bit by bit. I got the EA to work but sadly I don't think its a strategy that lends itself well to automation. Some of the trends are better than others and I don't think its something that can be programmed.
-
Good to know. Don't hesitate to ask for help here.