/*
Newz Traderz Mt4 vo1
Conversion only Dr. Gaines
Use on M1
Testing and demo only DO NOT USE WITH REAL MONEY.
USE AT YOUR OWN RISK !!!!!
*/
#include <stdlib.mqh>
extern double Lots = 0.01;
extern double StopLoss = 100.00;
extern double TakeProfit = 50.00;
extern double TrailingStop = 13.00;
extern double StartHour = 15;
extern double StartMinute = 27;
extern double vSL = 10;
extern double vTP = 20;
extern double EntryAmount = 10;
extern double OrderKillInSeconds = 300;
int LastTradeTime;
bool MOrderDelete( int ticket )
{
LastTradeTime = CurTime();
return ( OrderDelete( ticket ) );
}
int MOrderSend( string symbol, int cmd, double volume, double price, int slippage, double stoploss, double takeprofit, string comment="", int magic=0, datetime expiration=0, color arrow_color=CLR_NONE)
{
LastTradeTime = CurTime();
price = MathRound(price*10000)/10000;
stoploss = MathRound(stoploss*10000)/10000;
takeprofit = MathRound(takeprofit*10000)/10000;
return ( OrderSend( symbol, cmd, volume, price, slippage, stoploss, takeprofit, comment, magic, expiration, arrow_color ) );
}
int OrderValueTicket(int index)
{
OrderSelect(index, SELECT_BY_POS);
return(OrderTicket());
}
int OrderValueType(int index)
{
OrderSelect(index, SELECT_BY_POS);
return(OrderType());
}
string OrderValueSymbol(int index)
{
OrderSelect(index, SELECT_BY_POS);
return(OrderSymbol());
}
datetime OrderValueOpenTime(int index)
{
OrderSelect(index, SELECT_BY_POS);
return(OrderOpenTime());
}
int init()
{
// код доступен только после оплаты
}
int start()
{
// код доступен только после оплаты
}
double vEntry = 0;
double SL = 0;
double TP = 0;
double x = 600;
double OrderedEntered = 0;
int cnt = 0;
double counter = 0;
double vLots = 0;
double risk = 0;
int cnt2 = 0;
if( Period() != 1 )
{ Comment("MUST BE RUN ON Minute CHART!");
return(0);
}
if( CurTime() - LastTradeTime < 14 ) return(0);
Comment("Day Of Week : ",DayOfWeek()," Hour : ",Hour()," Minute : ",Minute(), " Seconds : ",Seconds(),
"'#10'","Waiting for ",StartHour," Start Hour ",StartMinute, " Start Minute");
if( OrderedEntered == 2 && OrdersTotal() == 2 )
{
if( OrderValueType(1) == OP_BUY || OrderValueType(1) == OP_SELL )
{
MOrderDelete(OrderValueTicketПоказано первые 50% кода (символов: 3274)
Введите ваш email и нажмите кнопку, чтобы перейти к оплате.