안녕 얘들아
EA에 대한 암호 보호를 위한 코드는 무엇입니까?
우리 EA가 은행간 fx 서버에서 작동하도록 할 수 있습니까?
도움을 주시면 감사하겠습니다.
안녕
쉐타안녕하세요 shwetha님,
아주 쉬운 친구!
....
int start()
{
if (password != 123456) //change the 123456 to the password you will give to the user!
{
Alert ("Wrong password! Do you want to cheat my system which I spent my life developing!");
return (0);
....
}그런 다음 EA를 컴파일하고 ENJOY
안녕하세요 shwetha님,
아주 쉬운 친구!
....
int start()
{
if (password != 123456) //change the 123456 to the password you will give to the user!
{
Alert ("Wrong password! Do you want to cheat my system which I spent my life developing!");
return (0);
....
}그건 그렇고, 왜 EA를 보호하고 싶습니까? 우리는 여기서 지식을 공유하지 않습니까?
오류 표시
안녕 모하메드
답변에 감사드립니다.하지만 컴파일했을 때 다음 오류가 표시됩니다.
'{' - 전역 범위에 대한 표현식이 허용되지 않습니다.
'\end_of_program' - 끝 대괄호 '}' 필요
당신의 응답을 기다리고
안녕
쉐타
안녕 모하메드
답변에 감사드립니다.하지만 컴파일했을 때 다음 오류가 표시됩니다.
'{' - 전역 범위에 대한 표현식이 허용되지 않습니다.
'\end_of_program' - 끝 대괄호 '}' 필요
당신의 응답을 기다리고
안녕
쉐타쉐타,
코드를 어떻게 작성해야 하는지에 대한 아이디어일 뿐입니다.
음, 코드는 다음과 같아야 합니다(Coders Guru "My First EA"의 교육 EA에 적용됨:
//| My_First_EA.mq4 |
//| Coders Guru |
//| https://www.forex-tsd.com |
//+------------------------------------------------------------------+
#property copyright "Coders Guru"
#property link "https://www.forex-tsd.com"
//---- input parameters
extern double TakeProfit=250.0;
extern double Lots=0.1;
extern double TrailingStop=35.0;
extern string password = "000000";
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
int Crossed (double line1 , double line2)
{
static int last_direction = 0;
static int current_dirction = 0;
if(line1>line2)current_dirction = 1; //up
if(line1<line2)current_dirction = 2; //down
if(current_dirction != last_direction) //changed
{
last_direction = current_dirction;
return (last_direction);
}
else
{
return (0);
}
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
//----
if(StringFind(password, "123456", 0) == -1) //change the 123456 to the password you will give to the user!
{
Alert ("Wrong password! Do you want to cheat my system which I spent my life developing!");
return (0);
}
int cnt, ticket, total;
double shortEma, longEma;
if(Bars<100)
{
Print("bars less than 100");
return(0);
}
if(TakeProfit<10)
{
Print("TakeProfit less than 10");
return(0); // check TakeProfit
}
shortEma = iMA(NULL,0,8,0,MODE_EMA,PRICE_CLOSE,0);
longEma = iMA(NULL,0,13,0,MODE_EMA,PRICE_CLOSE,0);
int isCrossed = Crossed (shortEma,longEma);
total = OrdersTotal();
if(total < 1)
{
if(isCrossed == 1)
{
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,Ask+TakeProfit*Point,"My EA",12345,0,Green);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("BUY order opened : ",OrderOpenPrice());
}
else Print("Error opening BUY order : ",GetLastError());
return(0);
}
if(isCrossed == 2)
{
ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,Bid-TakeProfit*Point,"My EA",12345,0,Red);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("SELL order opened : ",OrderOpenPrice());
}
else Print("Error opening SELL order : ",GetLastError());
return(0);
}
return(0);
}
for(cnt=0;cnt<total;cnt++)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if(OrderType()<=OP_SELL && OrderSymbol()==Symbol())
{
if(OrderType()==OP_BUY) // long position is opened
{
// should it be closed?
if(isCrossed == 2)
{
OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet); // close position
return(0); // exit
}
// check for trailing stop
if(TrailingStop>0){
if(Bid-OrderOpenPrice()>Point*TrailingStop)
{
if(OrderStopLoss()<Bid-Point*TrailingStop)
{
OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*TrailingStop,OrderTakeProfit(),0,Green);
return(0);
}
}
}
}
else // go to short position
{
// should it be closed?
if(isCrossed == 1)
{
OrderClose(OrderTicket(),OrderLots(),Ask,3,Violet); // close position
return(0); // exit
}
// check for trailing stop
if(TrailingStop>0){
if((OrderOpenPrice()-Ask)>(Point*TrailingStop))
{
if((OrderStopLoss()>(Ask+Point*TrailingStop)) || (OrderStopLoss()==0))
{
OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*TrailingStop,OrderTakeProfit(),0,Red);
return(0);
}
}
}
}
}
}
return(0);
}
//+------------------------------------------------------------------+왜요?
당신은 아직 나에게 대답하지 않았다 ; EA를 보호하고 싶은 것은 무엇입니까? 우리는 지식을 공유하고 서로 도우러 온 것이 아닙니까? (내 무료 코드를 보여주기 위해 Coders Guru의 무료 EA를 사용했음을 기억하십시오) ???
Metatrader 빌드 버전으로 평가판 EA도 가능합니다.
EA는 MetaTrader Build 버전 190에서만 실행됩니다!
MT Build != 190이면 EA를 지웁니다!
--
또는 귀하의 IB이고 새 계정을 위한 시스템을 제공하는 경우 시스템을 귀하의 IB 계정에 연결할 수 있습니다. 새로운 거래자는 귀하와 함께 자신의 계정으로 시스템을 사용할 수 있습니다. 귀하에게 커미션을 생성하지 않는 계정에서 그를 사용하여 귀하를 보호합니다.
저도 왜 PassWord인지 묻습니다. 코드를 보호하는 방법에 차이가 있습니다.
코키드카우보이
광산 빌드 191
내 메타 트레이더 버전은 4 build191입니다.
EA를 보호하는 수백 가지 방법이 있습니다.
1- 내가 제출한 코드(하드 코딩된 비밀번호)를 사용할 수 있습니다.
2- 무언가를 수집하고 비밀번호와 비교하는 알고리즘을 만들 수 있습니다. (예: 계정 증거금 x 구매 날짜 / 100).
3- dll을 생성하여 EA와 함께 제공하면 dll이 암호를 처리합니다(웹 사이트에 연결하여 암호를 얻을 수 있음).
4- EA를 사용자의 계좌번호로 묶을 수 있습니다. 당신은 이메일로 그에게 계정 번호를 알려달라고 요청하지만 EA에서 그것을 컴파일한 다음 컴파일된 버전을 사용자에게 보냅니다.
5- EA는 지정된 MT 버전에서만 작동할 수 있습니다.
6- EA의 실행 횟수를 제한할 수 있습니다.
7- EA 사용 일수를 제한할 수 있습니다.
8- EA를 무료로 공유하고 사용자에게 기부를 원하는지 물어볼 수 있습니다. 추천
안녕 얘들아
EA에 대한 암호 보호 를 위한 코드는 무엇입니까?
우리 EA가 은행간 fx 서버에서 작동하도록 할 수 있습니까?
도움을 주시면 감사하겠습니다.
안녕
쉐타