You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
#include <stdlib.mqh>
//+------------------------------------------------------------------+
//| Lot Multiplier. mq4 |
//| |
//| |
//+------------------------------------------------------------------+
#property copyright ""
#property link ""
//+------------------------------------------------------------------+
//| Common External variables |
//+------------------------------------------------------------------+
extern double Lots = 5.00;
extern double StopLoss = 40.00;
extern double TakeProfit = 5.00;
extern double HourT = 01;
extern double Slippage = 3;
int init()
{
return(0);
}
int start()
{
//+------------------------------------------------------------------+
//| Local variables |
//+------------------------------------------------------------------+
double RealTP = 0;
double RealSL = 0;
double RealTPS = 0;
double RealSLS = 0;
double ticket = 0;
int Loss = 0;
static int ClosedTrades;
if(ClosedTrades==HistoryTotal()-1)
OrderSelect(ClosedTrades,SELECT_BY_POS,MODE_HISTORY);
if((OrderType()==OP_BUY)||(OrderType()==OP_SELL))
if(CompareDoubles(OrderClosePrice(), OrderTakeProfit()))
{ Print ("Take Profit");
Lots = 5;
Loss = 0;
Print ("Profit Loss Count = ", Loss);
}
if(CompareDoubles(OrderClosePrice(), OrderStopLoss()))
{ Print ("Stop Loss");
Loss = Loss + 1;
Lots = Loss * 40;
Print ("SL Loss Count = ", Loss);
}
ClosedTrades=HistoryTotal();
if(DayOfWeek()==1 || DayOfWeek()==2 || DayOfWeek()==3 || DayOfWeek()==4 || DayOfWeek()==5)
if (Hour() == HourT)
if (Minute() >= 01 && (Minute()< 05))
if (OrdersTotal()==0)
{
RealSL=Ask-(StopLoss*Point);
RealTP=Ask+(TakeProfit*Point);
ticket = OrderSend(Symbol(),OP_BUY,Lots,Ask, Slippage, Ask-(StopLoss*Point), Ask+(TakeProfit*Point), "",16357,0,Red);
}
if(ticket<0)
{
Print("Buy OrderSend failed with error #",GetLastError());
}
return(0);
}
Thank you in advance for any help you can provide.
TeslaFX