How can I add capability to my EA to close all the open positions and DO NOTHING in specific circumstances

Back to topics list To post a new topic, please log in or register
avatar
65
CyrusTheGreat 2011.02.16 15:24
 

All of EA's that I have worked with open ie. long position and when condition changes close the open position and goes for short position right a way. There is always another condition that EA should close all the open positions and simply do NOTHING. Can you guide me how can I add this capability to my codes?

 
Oil Jumps to One-Month High as OPEC Ready to Talk to Producers
Oil rose to an one-month high after OPEC said it's prepared to converse with other worldwide makers to accomplish 'reasonable costs' and the U.S. government diminished its unrefined yield gauges. The Organization of Petroleum Exporting Countries, in charge of around 40 percent of the world's supply, is willing to talk, "yet this must be on a level playing field," as per the OPEC Bulletin, the bunch's month to month production.
avatar
Moderator
3853
ubzen 2011.02.16 16:17 #
 
Stop using stop & reverse logic. You can tell it to Buy when X=true/1 and Sell when X=false/-1. Personally, I like to use integers instead of Bool for my Trigger. You can also do things like set the Trigger to 0 when closing orders.
 
Back to topics list  

To add comments, please log in or register