diff --git a/Experts/Nkanven/AreaBreaker.mq5 b/Experts/Nkanven/AreaBreaker.mq5 index 958cb82..8b4d706 100644 --- a/Experts/Nkanven/AreaBreaker.mq5 +++ b/Experts/Nkanven/AreaBreaker.mq5 @@ -265,4 +265,3 @@ void CheckSpread() } } //+------------------------------------------------------------------+ -//+------------------------------------------------------------------+ diff --git a/Experts/Nkanven/AsianBreak.ex5 b/Experts/Nkanven/AsianBreak.ex5 new file mode 100644 index 0000000..ec3c727 Binary files /dev/null and b/Experts/Nkanven/AsianBreak.ex5 differ diff --git a/Experts/Nkanven/AsianBreak.mq5 b/Experts/Nkanven/AsianBreak.mq5 new file mode 100644 index 0000000..29982b6 Binary files /dev/null and b/Experts/Nkanven/AsianBreak.mq5 differ diff --git a/Experts/Nkanven/NewCandleAlert.ex5 b/Experts/Nkanven/NewCandleAlert.ex5 new file mode 100644 index 0000000..5d57564 Binary files /dev/null and b/Experts/Nkanven/NewCandleAlert.ex5 differ diff --git a/Experts/Nkanven/NewCandleAlert.mq5 b/Experts/Nkanven/NewCandleAlert.mq5 new file mode 100644 index 0000000..f55f84f --- /dev/null +++ b/Experts/Nkanven/NewCandleAlert.mq5 @@ -0,0 +1,50 @@ +//+------------------------------------------------------------------+ +//| NewCandleAlert.mq5 | +//| Copyright 2022, Nkondog Anselme Venceslas. | +//| https://www.linkedin.com/in/nkondog | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2022, Nkondog Anselme Venceslas." +#property link "https://www.linkedin.com/in/nkondog" +#property version "1.00" +//+------------------------------------------------------------------+ +//| Expert initialization function | +//+------------------------------------------------------------------+ +int OnInit() + { +//--- + +//--- + return(INIT_SUCCEEDED); + } +//+------------------------------------------------------------------+ +//| Expert deinitialization function | +//+------------------------------------------------------------------+ +void OnDeinit(const int reason) + { +//--- + + } +//+------------------------------------------------------------------+ +//| Expert tick function | +//+------------------------------------------------------------------+ +void OnTick() + { +//--- + newBar(); + } +//+------------------------------------------------------------------+ + +bool newBar() + { + static datetime prevTime = 0; + datetime currentTime = iTime(Symbol(), PERIOD_CURRENT, 0); + if(currentTime != prevTime) + { + prevTime = currentTime; + + Alert("New candle"); + + return(true); + } + return(false); + } \ No newline at end of file diff --git a/Experts/Nkanven/Sessions.ex5 b/Experts/Nkanven/Sessions.ex5 new file mode 100644 index 0000000..148d759 Binary files /dev/null and b/Experts/Nkanven/Sessions.ex5 differ diff --git a/Experts/Nkanven/Sessions.mq5 b/Experts/Nkanven/Sessions.mq5 new file mode 100644 index 0000000..3d091a3 Binary files /dev/null and b/Experts/Nkanven/Sessions.mq5 differ diff --git a/Experts/Nkanven/StarRiskCalculatorTrader.ex5 b/Experts/Nkanven/StarRiskCalculatorTrader.ex5 index 19781b8..d5bce8c 100644 Binary files a/Experts/Nkanven/StarRiskCalculatorTrader.ex5 and b/Experts/Nkanven/StarRiskCalculatorTrader.ex5 differ diff --git a/Experts/Nkanven/StarRiskCalculatorTrader.mq5 b/Experts/Nkanven/StarRiskCalculatorTrader.mq5 index 102195e..881fdc9 100644 Binary files a/Experts/Nkanven/StarRiskCalculatorTrader.mq5 and b/Experts/Nkanven/StarRiskCalculatorTrader.mq5 differ diff --git a/LotCal.ex4 b/LotCal.ex4 index 7391537..643cf08 100644 Binary files a/LotCal.ex4 and b/LotCal.ex4 differ diff --git a/LotCal.mq4 b/LotCal.mq4 index dbcdf13..411d9ce 100644 --- a/LotCal.mq4 +++ b/LotCal.mq4 @@ -105,7 +105,7 @@ void OnChartEvent(const int id, // Event identifier if(id==CHARTEVENT_OBJECT_DRAG) { price = ObjectGetDouble(0, sparam, OBJPROP_PRICE, 0); - Print("The anchor point coordinates of the object with name ",sparam," has been changed. Price ", price); + ///Print("The anchor point coordinates of the object with name ",sparam," has been changed. Price ", price); } if(id==CHARTEVENT_KEYDOWN) @@ -122,7 +122,7 @@ void OnChartEvent(const int id, // Event identifier Alert("Sell " + LotSize + " lot " + Symb + " at " + Bid + " SL at " + price); break; default: - Print("Do nothing"); + //Print("Do nothing"); break; } @@ -160,7 +160,7 @@ void LotSizeCalculate(double stopLoss) { SL = (stopLoss-PriceBid)/_Point; } - Print("Stop loss distance ", SL); + //Print("Stop loss distance ", SL); //If the position size is dynamic if(InpRiskDefaultSize==RISK_DEFAULT_AUTO) @@ -180,7 +180,7 @@ void LotSizeCalculate(double stopLoss) RiskBaseAmount=InpBalance; //Calculate the Position Size - Print("RiskBaseAmount ", RiskBaseAmount, " MaxRiskPerTrade ", InpMaxRiskPerTrade, "Stop loss ", SL, " TickValue ", TickValue); + //Print("RiskBaseAmount ", RiskBaseAmount, " MaxRiskPerTrade ", InpMaxRiskPerTrade, "Stop loss ", SL, " TickValue ", TickValue); LotSize=((RiskBaseAmount*InpMaxRiskPerTrade/100)/(SL*TickValue)); StoplossPips = SL; @@ -200,12 +200,12 @@ void LotSizeCalculate(double stopLoss) //Limit the lot size in case it is greater than the maximum allowed by the broker if(LotSize>SymbolInfoDouble(Symb,SYMBOL_VOLUME_MAX)) LotSize=SymbolInfoDouble(Symb,SYMBOL_VOLUME_MAX); - Print("Lot ", LotSize, " Max lot ", SymbolInfoDouble(Symb,SYMBOL_VOLUME_MAX)); + //Print("Lot ", LotSize, " Max lot ", SymbolInfoDouble(Symb,SYMBOL_VOLUME_MAX)); //If the lot size is too small then set it to 0 and don't trade if(LotSize < SymbolInfoDouble(Symb,SYMBOL_VOLUME_MIN)) { LotSize=0; - Print("Lot size too small"); + Alert("Lot size too small"); } } //+------------------------------------------------------------------+ diff --git a/LotCalTrader.ex4 b/LotCalTrader.ex4 index 0603c62..13868fd 100644 Binary files a/LotCalTrader.ex4 and b/LotCalTrader.ex4 differ diff --git a/LotCalTrader.mq4 b/LotCalTrader.mq4 index 388d1e4..3b1cbc8 100644 --- a/LotCalTrader.mq4 +++ b/LotCalTrader.mq4 @@ -95,7 +95,7 @@ void OnChartEvent(const int id, // Event identifier if(id==CHARTEVENT_OBJECT_DRAG) { price = ObjectGetDouble(0, sparam, OBJPROP_PRICE, 0); - Print("The anchor point coordinates of the object with name ",sparam," has been changed. Price ", price); + //Print("The anchor point coordinates of the object with name ",sparam," has been changed. Price ", price); displayOnChart(); } @@ -113,7 +113,7 @@ void OnChartEvent(const int id, // Event identifier Alert("Sell " + LotSize + " lot " + Symb + " at " + Bid + " SL at " + price); break; default: - Print("Do nothing"); + //Print("Do nothing"); break; } @@ -151,7 +151,7 @@ void LotSizeCalculate(double stopLoss) { SL = (stopLoss-PriceBid)/_Point; } - Print("Stop loss distance ", SL); + //Print("Stop loss distance ", SL); //If the position size is dynamic if(InpRiskDefaultSize==RISK_DEFAULT_AUTO) @@ -171,7 +171,7 @@ void LotSizeCalculate(double stopLoss) RiskBaseAmount=InpBalance; //Calculate the Position Size - Print("RiskBaseAmount ", RiskBaseAmount, " MaxRiskPerTrade ", InpMaxRiskPerTrade, "Stop loss ", SL, " TickValue ", TickValue); + //Print("RiskBaseAmount ", RiskBaseAmount, " MaxRiskPerTrade ", InpMaxRiskPerTrade, "Stop loss ", SL, " TickValue ", TickValue); LotSize=((RiskBaseAmount*InpMaxRiskPerTrade/100)/(SL*TickValue)); StoplossPips = SL; @@ -191,12 +191,12 @@ void LotSizeCalculate(double stopLoss) //Limit the lot size in case it is greater than the maximum allowed by the broker if(LotSize>SymbolInfoDouble(Symb,SYMBOL_VOLUME_MAX)) LotSize=SymbolInfoDouble(Symb,SYMBOL_VOLUME_MAX); - Print("Lot ", LotSize, " Max lot ", SymbolInfoDouble(Symb,SYMBOL_VOLUME_MAX)); + //Print("Lot ", LotSize, " Max lot ", SymbolInfoDouble(Symb,SYMBOL_VOLUME_MAX)); //If the lot size is too small then set it to 0 and don't trade if(LotSize < SymbolInfoDouble(Symb,SYMBOL_VOLUME_MIN)) { LotSize=0; - Print("Lot size too small"); + //Print("Lot size too small"); } } //+------------------------------------------------------------------+ diff --git a/NewCandleAlert.ex4 b/NewCandleAlert.ex4 new file mode 100644 index 0000000..4a9f365 Binary files /dev/null and b/NewCandleAlert.ex4 differ diff --git a/NewCandleAlert.mq4 b/NewCandleAlert.mq4 new file mode 100644 index 0000000..b4747a0 --- /dev/null +++ b/NewCandleAlert.mq4 @@ -0,0 +1,51 @@ +//+------------------------------------------------------------------+ +//| NewCandleAlert.mq4 | +//| Copyright 2022, Nkondog Anselme Venceslas. | +//| https://www.linkedin.com/in/nkondog | +//+------------------------------------------------------------------+ +#property copyright "Copyright 2022, Nkondog Anselme Venceslas." +#property link "https://www.linkedin.com/in/nkondog" +#property version "1.00" +#property strict +//+------------------------------------------------------------------+ +//| Expert initialization function | +//+------------------------------------------------------------------+ +int OnInit() + { +//--- + +//--- + return(INIT_SUCCEEDED); + } +//+------------------------------------------------------------------+ +//| Expert deinitialization function | +//+------------------------------------------------------------------+ +void OnDeinit(const int reason) + { +//--- + + } +//+------------------------------------------------------------------+ +//| Expert tick function | +//+------------------------------------------------------------------+ +void OnTick() + { +//--- + newBar(); + } +//+------------------------------------------------------------------+ + +bool newBar() + { + static datetime prevTime = 0; + datetime currentTime = iTime(Symbol(), PERIOD_CURRENT, 0); + if(currentTime != prevTime) + { + prevTime = currentTime; + + Alert("New candle"); + + return(true); + } + return(false); + } \ No newline at end of file diff --git a/Symbolic link cmd.txt b/Symbolic link cmd.txt index ac2b387..e3fb71e 100644 --- a/Symbolic link cmd.txt +++ b/Symbolic link cmd.txt @@ -1 +1 @@ -New-Item -ItemType Junction -Path "C:\Users\Nkondog\AppData\Roaming\MetaQuotes\Terminal\10CE948A1DFC9A8C27E56E827008EBD4\MQL5\Experts\Nkanven" -Target "D:\ITprojects\sat_bot\Experts\Nkanven" \ No newline at end of file +New-Item -ItemType Junction -Path "C:\Users\Nkondog\AppData\Roaming\MetaQuotes\Terminal\E3E3B02889D32F38295D39BF94B6AD4A\MQL5\Include\Nkanven" -Target "D:\ITprojects\sat_bot\Include\Nkanven" \ No newline at end of file