PipsingV1_Setup

Download script
Author: Copyright � 2008, AP
PipsingV1_Setup

This tool is designed to act as a configuration and information display utility within your trading platform. Its primary purpose is to manage, verify, and visualize the specific parameters used for your trading setups directly on your price chart.

Key Functionalities

Configuration Verification When you run this script, it first performs an internal audit of your trading settings. It checks nine specific variables—including trade size (Lot), slippage allowances, repetition counts, profit targets, stop-loss levels, and "blank" values for buys and sells. The script ensures that these preferences are properly registered within the platform's global memory. If any of these settings are missing or improperly configured, the tool will alert you with a notification box so you can correct them before proceeding.

Dynamic Information Display Once the settings are confirmed as valid, the script generates a clean, text-based summary of your current trading parameters. It gathers all these individual data points and combines them into a single, easy-to-read string. This allows you to see exactly what rules your current setup is following at a glance, without having to navigate through deep menus.

Visual Chart Integration To make this information accessible during active trading, the script places this summary directly onto your chart as an on-screen text object. It intelligently positions this text based on the current visible area of your screen.

Smart Updates and Positioning The tool is designed to be user-friendly regarding its placement:

  • Automatic Creation: If the information label does not exist, the script creates it automatically.
  • Auto-Relocation: If you scroll your chart or move to a different time frame, the script monitors the position of the text. If the text moves off-screen, the script automatically relocates it back into your current view so that your trading parameters remain visible at all times.

In summary, this script serves as a "dashboard" helper that confirms your trading rules are correctly loaded and ensures that those rules are always visible on your screen as you navigate through different market data.

Miscellaneous
It opens Message Boxes to the user
14 Views
0 Downloads
0 Favorites
PipsingV1_Setup
//+------------------------------------------------------------------+
//|                                             Pipsing_Setup_V1.mq4 |
//|                                             Copyright © 2008, AP |
//|                                                   ekr-ap@mail.ru |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2008, AP"
#property link      "ekr-ap@mail.ru"
#property show_inputs
//----
#include <WinUser32.mqh>

//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+

extern double  Lot=0.1;
extern int     Slippage=3;
extern int     Repetitions=1;
extern int     Buy_tp=10;
extern int     Buy_sl=40;
extern int     Sell_tp=10;
extern int     Sell_sl=40;
extern double  Blank_buy=0;
extern double  Blank_sell=0;



int start()
  { string r="error from"; string ex;
      
    
  if(GlobalVariableSet("Lot_P",Lot)==0)                   r=r+"1 ";
  if(GlobalVariableSet("Slippage_P",Slippage)==0)         r=r+"2 ";
  if(GlobalVariableSet("Repetitions_P",Repetitions)==0)   r=r+"3 ";
  if(GlobalVariableSet("Buy_tp_P",Buy_tp)==0)             r=r+"4 ";
  if(GlobalVariableSet("Buy_sl_P",Buy_sl)==0)             r=r+"5 ";
  if(GlobalVariableSet("Sell_tp_P",Sell_tp)==0)           r=r+"6 ";
  if(GlobalVariableSet("Sell_sl_P",Sell_sl)==0)           r=r+"7 ";
 
  if(GlobalVariableSet("Blank_buy_P",Blank_buy)==0)       r=r+"8 ";
  if(GlobalVariableSet("Blank_sell_P",Blank_sell)==0)     r=r+"9 ";
 
  if(StringLen(r)>10) {MessageBox(r,"",MB_OK|MB_ICONERROR); }
  else
  {

   ex="PiPsing= "+DoubleToStr(Lot,1)+" "+DoubleToStr(Slippage,0)+"  "+DoubleToStr(Repetitions,0)+
   "  "+DoubleToStr(Buy_tp,0)+"  "+DoubleToStr(Buy_sl,0)+
   "  "+DoubleToStr(Sell_tp,0)+"  "+DoubleToStr(Sell_sl,0)+
   "  "+DoubleToStr(Blank_buy,0)+"  "+DoubleToStr(Blank_sell,0);
 
   int i=WindowBarsPerChart()/2;
   if(ObjectFind("PipsOwn")==-1) 
                           {ObjectCreate("PipsOwn",OBJ_TEXT,0,iTime(NULL,0,i),High[i]+40*Point);
                            ObjectSetText("PipsOwn", ex  , 9,"",White);
                           } 
   else 
       {
       ObjectSetText("PipsOwn", ex  , 9,"",White);
         if    (  iBarShift ( NULL,0,ObjectGet ( "PipsOwn",OBJPROP_TIME1),FALSE )>WindowBarsPerChart())
         ObjectSet("PipsOwn",OBJPROP_TIME1,iTime(NULL,0,i));  //åñëè çà êðàé ýêðàíà
       }
   }
   return(0);
  }
//+------------------------------------------------------------------+

Comments