SmallHelp@Buy

Download script
Profit factor:
0.00

This automated trading tool is designed to manage your trading activity by continuously monitoring market conditions and executing specific "Buy" orders based on predefined limits. It serves as a systematic way to enter positions while visually marking key data points on your trading chart.

Core Trading Logic

The script operates on a high-frequency execution model. Whenever the tool runs, it checks your current open positions. If the number of active trades is below the maximum limit you have set (for example, 5 orders), the system immediately triggers a new "Buy" order. This creates a recurring loop where the script attempts to fill your allowed capacity of trades automatically.

Visual Indicators and Data Tracking

Beyond executing trades, the script provides real-time visual feedback on your workspace by drawing specific lines on the chart:

  • Vertical Markers: The tool calculates a specific value based on a technical momentum indicator (the Relative Volatility Index) and places a white vertical line on the chart. This helps you visualize exactly where the system is reacting to price movements.
  • Horizontal Markers: Similarly, it calculates a horizontal reference point using the same underlying technical logic. This line remains constant as a visual guide for price levels.

Technical Calculation Summary

The specific "level" used for these lines and trade triggers is derived from a weighted combination of two different components of the Relative Volatility Index (RVI). By combining the "Signal" line and multiplying the "Main" line by a factor of four, the script generates a unique price coordinate. This coordinate acts as the foundation for the tool's spatial markers, helping the user see where the underlying mathematical logic is currently pointing.

Operational Flow

  1. Initialization: When first launched, the script immediately establishes its visual markers and attempts to open the initial set of orders.
  2. Continuous Execution: The script constantly refreshes itself, updating the positions of the horizontal and vertical lines to match the latest calculations while simultaneously checking if there is "room" to open more buy positions.
  3. Automatic Management: By handling the order placement and the drawing of indicators simultaneously, it automates the repetitive task of monitoring volume limits and placing entries.
14 Views
0 Downloads
0 Favorites
SmallHelp@Buy
//=====================================================================================================================================================
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()
  {
   OpenBuy();
   DrawVertical();
   DrawHorizontal();
   return(0);
  }

int deinit()
  {
   return(0);
  }

int start()
  {
   OpenBuy();
   DrawVertical();
   DrawHorizontal();
   return(0);
  }

//-----------------------------------------------------------------------------------------------------------------------------------------------------
double OpenBuy()
  {
   if(OrdersTotal()<MaxOrders)
    {
     //OrderSend(Symbol(),OP_BUY,LOTS,Ask,3,Bid-150*Point,Bid+100*Point,"BUY",0,0,Red);   
     OrderSend(Symbol(),OP_BUY,LOTS,Ask,3,StopLoss,TakeProfit,"BUY",0,0,Red);
     OpenBuy();
    }   
  }
//-----------------------------------------------------------------------------------------------------------------------------------------------------
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;
  }
//-----------------------------------------------------------------------------------------------------------------------------------------------------




Comments