EA Sleep Or Suspend

Post Reply
patways
Posts: 5
Joined: Wed Mar 07, 2012 2:51 pm

EA Sleep Or Suspend

Post by patways »

I was able to come up with the attached EA, I have live tested it on VPS for about 2 months however, let me introduce the strategy as you may also see on the code

1. the EA use MCT indicator on H4 and H1 as trend and I trade it on M15 TF using Extreem Spike indicator and Zigzag indicator to enter trade position based on the H4 and H1 MCT indicator trend.
2. the problem is that:
I want the EA to stop working after it enter a trade based on example: (MCT H4 and MCT H1 is UP and Extreem Spike is UP) BUY is opened, TP and SL is set (once this is TRUE; EA should sleep and then wake up once this condition: (MCT H4 and MCT H1 is UP and Extreem Spike is UP) changes but this EA should continue to sleep as long as there was no changes to the condition that open the buy position however if : (MCT H4 and MCT H1 is UP and Extreem Spike is DOWN) this should wake the EA up as this is a change in the signal for the EA to be ready for another trade entry.

I hope this will interest you. I tried to use the DynamicStop but it was not profitable like the fixed TP and SL that was profitable but the problem is: if the TP is hit while the signal is still valid, the EA will still open another trade. If the sleep code can be added or if it can be coded to stop working after a trade entry and modification is successful and to start working if the signal changes, I tell you the truth, this will be a good EA.

I hope some one will take a look and come up with a solution,

Thank you.
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “Coders Hangout”