MQL4 - automated forex trading   /  

Forum

Login | Register | Language: ru cn en
Write an Article and Earn Money

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?

 
EURUSD Technical Analysis - Monthly Forecast
EURUSD Technical Analysis - Monthly Forecast
Sergey Golubev | 24 October 2014, 06:11 | Views: 88
MN price: Chinkou Span line of Ichimoku indicator came to be very near with the price to be ready for crossing it from above to below for good breakdown. The nearest support level is 1.2571 which is almost ready to be crossed by the price on open bar too for example. This situation is very interesting because of the following: if Chinkou Span crosses the price from above to below with the current MN bearish market condition together with the price for breaking 1.
avatar
Moderator
3854
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