Thread: MQL4 Learning
View Single Post
  #406 (permalink)  
Old 06-27-2008, 12:12 PM
xtf xtf is offline
Junior Member
 
Join Date: Jan 2006
Posts: 27
xtf is on a distinguished road
IF statements?

How do you do a simple program with IF statements in MQL4 such as

If price=level 2 then sell.
if price= level 3 then sell
If price= level 1 or level 4, close all trades
restrict trades to 1 per level

with levels set by an indicator or manually


Sorry if this is an impertinent question but it would be good to cut to the chase and avoid learning all the colours, variables, graphics etc etc- just to be able to try out some simple ideas


an example program for the above would be fantastic

thanks
Reply With Quote