거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Facebook에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
라이브러리

CEquityHstBar - MetaTrader 4용 라이브러리

조회수:
7561
평가:
(11)
게시됨:
2017.11.20 09:19
업데이트됨:
2017.11.22 12:30
\MQL4\Include\ \MQL4\Experts\
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

CEquityHstBar is the library for showing the equity of EA back-testing on an offline chart. The class is designed to write the equity data in back-testing into .hst file, and then show the equity on an offline chart.

The .hst file is in the \tester folder, call CopyFile() to copy it to the history folder, and then open it from "File" → "Open Offline".

  • <Data folder>\tester\files\
  • <Data folder>\history\account server\


Usage

  1. Create an instance of CEquityHstBar.
  2. Call Update() in OnTick().
  3. Call SaveData() in OnDeinit().
  4. Call CopyFile() in OnDeinit().
  5. Open the .hst file from "File" → "Open Offline".
//+------------------------------------------------------------------+
//|                                            test_EquityHstBar.mq4 |
//|                                          Copyright 2017,fxMeter. |
//|                            https://www.mql5.com/en/users/fxmeter |
//+------------------------------------------------------------------+
#property copyright "Copyright 2017,fxMeter."
#property link      "https://www.mql5.com/en/users/fxmeter"
#property version   "1.00"
#property strict
#include <EquityHstBar.mqh>

//--- create an instance 
CEquityHstBar ebar("EquityBar",PERIOD_M30);

//--- or create an instance 
// CEquityHstBar ebar;  

int pt=1;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
   if(Digits()==5 || Digits==3)pt=10;
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---      
   ebar.SaveData();
   ebar.CopyFile();
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---
   ebar.Update();

   static double stoploss=20;   //Pips
   static double takeprofit=30; //Pips
   int tkt=-1;
   if(OrdersTotal()==0)
     {
      if(Hour()/2==0) tkt=OrderSend(Symbol(),0,0.1,Ask,10,Ask-stoploss*pt*Point,Ask+takeprofit*pt*Point);
      else tkt=OrderSend(Symbol(),1,0.1,Bid,10,Bid+stoploss*pt*Point,Bid-takeprofit*pt*Point);
     }
  }
//+------------------------------------------------------------------+

Self Optimizing RSI or MFI Trader Self Optimizing RSI or MFI Trader

This robot optimizes the values it uses for overbought and oversold based on what would have been profitable during the Optimization periods(bars) back. Using the strategy of selling when the index indicator crosses below overbought and buying when the index indicator crosses above oversold.

Multi Timeframe Triple Moving Averages Multi Timeframe Triple Moving Averages

This indicator allows you to see the Moving Averages from different timeframes on the same chart. It helps you to spot the dynamic levels of support and resistance. It uses a custom window with check boxes to show/hide the different Moving Averages without need to access the indicator settings window.

SL&TP Values SL&TP Values

Indicator displays the value of defined stop loss and or take profit in the deposit currency.

Center of Gravity Modification Center of Gravity Modification

Center of Gravity Modification 2018.