mirror of
https://github.com/rithsila/MT5-EA-Sniper-Strategy.git
synced 2026-08-21 06:38:13 +00:00
Gervis position opening
This commit is contained in:
Binary file not shown.
@@ -15,7 +15,7 @@ CiMA* sma;
|
||||
CiMA* ssma;
|
||||
|
||||
#include <Nkanven\Gervis\Parameters.mqh> // Description of variables
|
||||
#include <DL_ErrorHandling.mqh> // Error library
|
||||
#include <Nkanven\DL_ErrorHandling.mqh> // Error library
|
||||
#include <Nkanven\Gervis\PreChecks.mqh> // Prechecks
|
||||
#include <Nkanven\Gervis\TradingHour.mqh> //
|
||||
#include <Trade\Trade.mqh>
|
||||
@@ -57,31 +57,17 @@ void OnTick()
|
||||
//---
|
||||
SymbolInfoTick(_Symbol,last_tick);
|
||||
|
||||
//sma.Refresh(-1);
|
||||
//ssma.Refresh(-1);
|
||||
TimeCurrent(dt);
|
||||
|
||||
//gSma = sma.Main(1);
|
||||
//gSsma = ssma.Main(1);
|
||||
CheckOperationHours();
|
||||
|
||||
gCandleHigh = iHigh(gSymbol, PERIOD_CURRENT, 1);
|
||||
gCandleLow = iLow(gSymbol, PERIOD_CURRENT, 1);
|
||||
gCandleOpen = iOpen(gSymbol, PERIOD_CURRENT, 1);
|
||||
gCandleClose = iClose(gSymbol, PERIOD_CURRENT, 1);
|
||||
|
||||
gMinStopLoss =MathAbs(SymbolInfoInteger(gSymbol, SYMBOL_TRADE_STOPS_LEVEL))+20;
|
||||
|
||||
//isQualifiedCandle(0);
|
||||
OrderClose();
|
||||
|
||||
ScanPositions();
|
||||
if(gTotalOpenPositions==0)
|
||||
gSignalEntry = SIGNAL_ENTRY_BUY;
|
||||
|
||||
CheckSpread();
|
||||
entryConditions();
|
||||
EvaluateEntry();
|
||||
drawLine();
|
||||
ExecuteEntry();
|
||||
|
||||
Comment(
|
||||
|
||||
Binary file not shown.
@@ -12,6 +12,7 @@ enum ENUM_SIGNAL_ENTRY
|
||||
SIGNAL_ENTRY_NEUTRAL=0, //SIGNAL ENTRY NEUTRAL
|
||||
SIGNAL_ENTRY_BUY=1, //SIGNAL ENTRY BUY
|
||||
SIGNAL_ENTRY_SELL=2, //SIGNAL ENTRY BUY
|
||||
SIGNAL_ENTRY_BUY_LIMIT=3, //SIGNAL PENDING BUY LIMIT
|
||||
};
|
||||
|
||||
//Enumerative for the exit signal value
|
||||
@@ -115,7 +116,7 @@ input int InpMaxStopLoss=5000; //Maximu
|
||||
input bool InpAtrStopLoss=false; //Set Stop loss based on ATR
|
||||
input int InpAtrStopLossFactor=3; //Multiplicator for ATR stop loss
|
||||
input ENUM_MODE_TP InpTakeProfitMode=TP_AUTO; //Take Profit Mode
|
||||
input int InpDefaultTakeProfit=0; //Default Take Profit In Points (0=No Take Profit)
|
||||
input int InpDefaultTakeProfit=15; //Default Take Profit In Points (0=No Take Profit)
|
||||
input int InpMinTakeProfit=0; //Minimum Allowed Take Profit In Points
|
||||
input int InpMaxTakeProfit=5000; //Maximum Allowed Take Profit In Points
|
||||
input double InpTakeProfitPercent=1.0; //Take Profit percent on risk base
|
||||
|
||||
Reference in New Issue
Block a user