VR Smart Grid Lite最新版测评

VR Smart Grid Lite最新版测评-EA侦探社 - 全球领先的MQL5官网外汇EA机器人MT4自动化交易EA资源免费分享网站
VR Smart Grid Lite最新版测评
此内容为免费资源,请登录后查看
0积分
免费资源

如果免费资源下载的文件为TXT文档

请联系站长更新!站长微信:Lv596999  Telegram:@eapoj

“Mql5官网”板块的EA基本都有,大部分是无限制NODLL版,NODLL版本MT1420升级,大多数不可用!这些EA来源为国外花钱买过来的

有需要,请联系站长!

“EA测评”板块资源全部现有,看见不错的,可以联系站长看EA在确定是否收费

“无限制EA”板块,大部分免费,下载文件全部存在,都可以免费下载

站长硬盘EA太多,因大部分时间做交易,做风控,没太多时间更新下载地址,请谅解!

需要更新下载文件,请联系站长微信!国外朋友请联系Telegram。


//************************************************************************************************/
//* VR Smart Grid Lite.mq4 */
//* Copyright 2018, Trading-go Project. */
//* Author: Voldemar, Version: 14.03.2018, Site http://trading-go.ru */
//************************************************************************************************/
//* */
//************************************************************************************************/
//| Full version MetaTrader 4 https://www.mql5.com/ru/market/product/28140
//| Lite version MetaTrader 4 https://www.mql5.com/ru/code/20223/181692
//************************************************************************************************/
//| All products of the Author https://www.mql5.com/ru/users/voldemar/seller
//************************************************************************************************/
#property copyright “Copyright 2018, Trading-go Project.”
#property link “http://trading-go.ru”
#property version “18.030”
#property description ” ”
#property strict
//************************************************************************************************/
//* */
//************************************************************************************************/
input int iTakeProfit = 300; // Take Profit (in pips)
input double iStartLots = 0.01; // Start lot
input int iPointOrderStep = 390; // Point order step (in pips)
input int iMinimalProfit = 70; // Minimal profit for close grid (in pips)
input int iMagicNumber = 227; // Magic Number (in number)
input int iSlippage = 30; // Slippage (in pips)
//—
//************************************************************************************************/
//* */
//************************************************************************************************/
int OnInit()
{
Comment(“”);
return(INIT_SUCCEEDED);
}
//************************************************************************************************/
//* */
//************************************************************************************************/
void OnTick()
{
double
BuyPriceMax=0,BuyPriceMin=0,BuyPriceMaxLot=0,BuyPriceMinLot=0,
SelPriceMin=0,SelPriceMax=0,SelPriceMinLot=0,SelPriceMaxLot=0;

int
BuyPriceMaxTic=0,BuyPriceMinTic=0,SelPriceMaxTic=0,SelPriceMinTic=0;

double
op=0,lt=0,tp=0;

int
tk=0,b=0,s=0;

for(int i=OrdersTotal()-1;i>=0;i–)
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
if(OrderMagicNumber()==iMagicNumber)
if(OrderSymbol()==Symbol())
{
op=NormalizeDouble(OrderOpenPrice(),Digits());
lt=NormalizeDouble(OrderLots(),2);
tk=OrderTicket();
if(OrderType()==OP_BUY)
{
b++;
if(op>BuyPriceMax || BuyPriceMax==0)
{
BuyPriceMax = op;
BuyPriceMaxLot = lt;
BuyPriceMaxTic = tk;
}
if(op<BuyPriceMin || BuyPriceMin==0)
{
BuyPriceMin = op;
BuyPriceMinLot = lt;
BuyPriceMinTic = tk;
}
}
// ===
if(OrderType()==OP_SELL)
{
s++;
if(op>SelPriceMax || SelPriceMax==0)
{
SelPriceMax = op;
SelPriceMaxLot = lt;
SelPriceMaxTic = tk;
}
if(op<SelPriceMin || SelPriceMin==0)
{
SelPriceMin = op;
SelPriceMinLot = lt;
SelPriceMinTic = tk;
}
}
}
//*************************************************************//
double AwerageBuyPrice=0,AwerageSelPrice=0;
if(b>=2) AwerageBuyPrice=NormalizeDouble((BuyPriceMax*BuyPriceMaxLot+BuyPriceMin*BuyPriceMinLot)/(BuyPriceMaxLot+BuyPriceMinLot)+iMinimalProfit*Point(),Digits());
if(s>=2) AwerageSelPrice=NormalizeDouble((SelPriceMax*SelPriceMaxLot+SelPriceMin*SelPriceMinLot)/(SelPriceMaxLot+SelPriceMinLot)-iMinimalProfit*Point(),Digits());
//*************************************************************//
double BuyLot=0,SelLot=0;
if(BuyPriceMinLot==0) BuyLot=iStartLots; else BuyLot=BuyPriceMinLot*2;
if(SelPriceMaxLot==0) SelLot=iStartLots; else SelLot=SelPriceMaxLot*2;
//*************************************************************//
if(Close[1]>Open[1])
if((b==0) || (b>0 && (BuyPriceMin-Ask)>(iPointOrderStep*Point())))
if(OrderSend(Symbol(),OP_BUY,NormalizeDouble(BuyLot,2),NormalizeDouble(Ask,Digits()),iSlippage,0,0,”VR Setka Lite”,iMagicNumber,0,clrGreen)<0)
Print(“OrderSend error #”,GetLastError());

if(Close[1]<Open[1])
if((s==0) || (s>0 && (Bid-SelPriceMax)>(iPointOrderStep*Point())))
if(OrderSend(Symbol(),OP_SELL,NormalizeDouble(SelLot,2),NormalizeDouble(Bid,Digits()),iSlippage,0,0,”VR Setka Lite”,iMagicNumber,0,clrGreen)<0)
Print(“OrderSend error #”,GetLastError());
//*************************************************************//
for(int i=OrdersTotal()-1;i>=0;i–)
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
if(OrderMagicNumber()==iMagicNumber)
if(OrderSymbol()==Symbol())
{
op=NormalizeDouble(OrderOpenPrice(),Digits());
tp=NormalizeDouble(OrderTakeProfit(),Digits());
lt=NormalizeDouble(OrderLots(),2);
tk=OrderTicket();

if(OrderType()==OP_BUY && b==1 && tp==0)
if(!OrderModify(tk,op,OrderStopLoss(),NormalizeDouble(Ask+iTakeProfit*Point(),Digits()),0,clrRed))
Print(“OrderModify error #”,GetLastError());

if(OrderType()==OP_SELL && s==1 && tp==0)
if(!OrderModify(tk,op,OrderStopLoss(),NormalizeDouble(Bid-iTakeProfit*Point(),Digits()),0,clrRed))
Print(“OrderModify error #”,GetLastError());

if(OrderType()==OP_BUY && b>=2)
{
if(tk==BuyPriceMaxTic || tk==BuyPriceMinTic)
if(Bidif(!OrderModify(tk,op,OrderStopLoss(),AwerageBuyPrice,0,clrRed))
Print(“OrderModify error #”,GetLastError());

if(tk!=BuyPriceMaxTic && tk!=BuyPriceMinTic && tp!=0)
if(!OrderModify(tk,op,0,0,0,clrRed))
Print(“OrderModify error #”,GetLastError());
}
if(OrderType()==OP_SELL && s>=2)
{
if(tk==SelPriceMaxTic || tk==SelPriceMinTic)
if(Ask>AwerageSelPrice && tp!=AwerageSelPrice)
if(!OrderModify(tk,op,OrderStopLoss(),AwerageSelPrice,0,clrRed))
Print(“OrderModify error #”,GetLastError());

if(tk!=SelPriceMaxTic && tk!=SelPriceMinTic && tp!=0)
if(!OrderModify(tk,op,0,0,0,clrRed))
Print(“OrderModify error #”,GetLastError());
}
}
}
//************************************************************************************************/
//* */
//************************************************************************************************/
void OnDeinit(const int reason)
{

}
//************************************************************************************************/
//* */
//************************************************************************************************/

© 版权声明
THE END
喜欢就支持一下吧
点赞96 分享
相关推荐