//+------------------------------------------------------------------+ //| ControlPoints.mq4 | //| | //| | //+------------------------------------------------------------------+ #property copyright "Joke by primajaya" #property link "Control Points is a Joke" extern int TP = 100; extern int SL = 50; #define magic 8888 // very lucky right? #define risk 10 // 10% enough //+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| expert deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| expert start function | //+------------------------------------------------------------------+ int start() { //---- double op = iOpen(Symbol(),1440,0); double lot = NormalizeDouble(AccountEquity()*risk/100000,1); if(OrdersTotal()<1) { if(Ask<op) OrderSend(Symbol(),OP_BUY,lot,Ask,2,Ask-SL*Point,Ask+TP*Point,"Control Points",magic,0,Red); if(Bid>op) OrderSend(Symbol(),OP_SELL,lot,Bid,2,Bid+SL*Point,Bid-TP*Point,"Control Points",magic,0,Blue); } //---- return(0); } //+------------------------------------------------------------------+
Sample
Analysis
Market Information Used:
Series array that contains open prices of each bar
Indicator Curves created:
Indicators Used:
Custom Indicators Used:
Order Management characteristics:
Checks for the total of open orders
It automatically opens orders when conditions are reached
Other Features: