//===================================================================================================================================================== int NONE=0; int MaxOrders=5; double LOTS=0.5; double StopLoss=0.00000; double TakeProfit=0.00000; //===================================================================================================================================================== int Window=1,TimePart=0; double MinValue=-0.007978,MaxValue=0.086278; int Color=Blue; //===================================================================================================================================================== double Vertical,Horizontal; int SColor=White; //===================================================================================================================================================== int init() { OpenSell(); DrawVertical(); DrawHorizontal(); return(0); } int deinit() { return(0); } int start() { OpenSell(); DrawVertical(); DrawHorizontal(); return(0); } //----------------------------------------------------------------------------------------------------------------------------------------------------- double OpenSell() { if(OrdersTotal()<MaxOrders) { //OrderSend(Symbol(),OP_SELL,LOTS,Bid,3,Ask+150*Point,Ask-100*Point,"SELL",0,0,Yellow); OrderSend(Symbol(),OP_SELL,LOTS,Bid,3,StopLoss,TakeProfit,"SELL",0,0,Yellow); OpenSell(); } } //----------------------------------------------------------------------------------------------------------------------------------------------------- double DrawVertical() { SetVertical(); ObjectDelete("OpenedVertical"); ObjectCreate("OpenedVertical",OBJ_VLINE,Window,TimePart,Vertical); ObjectSet("OpenedVertical",OBJPROP_COLOR,SColor); } //----------------------------------------------------------------------------------------------------------------------------------------------------- double DrawHorizontal() { SetHorizontal(); ObjectDelete("OpenedHorizontal"); ObjectCreate("OpenedHorizontal",OBJ_HLINE,Window,TimePart,Vertical); ObjectSet("OpenedHorizontal",OBJPROP_COLOR,SColor); } //----------------------------------------------------------------------------------------------------------------------------------------------------- double SetVertical() { Vertical=iRVI(NULL,0,10,MODE_SIGNAL,0)+iRVI(NULL,0,10,MODE_MAIN,0)*4; } //----------------------------------------------------------------------------------------------------------------------------------------------------- double SetHorizontal() { Horizontal=iRVI(NULL,0,10,MODE_SIGNAL,0)+iRVI(NULL,0,10,MODE_MAIN,0)*4; } //-----------------------------------------------------------------------------------------------------------------------------------------------------
Sample
Analysis
Market Information Used:
Indicator Curves created:
Indicators Used:
Relative Vigor index
Custom Indicators Used:
Order Management characteristics:
Checks for the total of open orders
It automatically opens orders when conditions are reached
Other Features: