mirror of
https://github.com/rithsila/MT5-EA-Sniper-Strategy.git
synced 2026-08-26 09:08:22 +00:00
Gervis DCA
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
//+------------------------------------------------------------------+
|
||||
//| HighestPriceLevel.mqh |
|
||||
//| Copyright 2021, Nkondog Anselme Venceslas |
|
||||
//| https://www.mql5.com |
|
||||
//+------------------------------------------------------------------+
|
||||
#property copyright "Copyright 2021, Nkondog Anselme Venceslas"
|
||||
#property link "https://www.mql5.com"
|
||||
|
||||
//+------------------------------------------------------------------+
|
||||
//| |
|
||||
//+------------------------------------------------------------------+
|
||||
void drawLine()
|
||||
{
|
||||
string obj_name = "Recent high";
|
||||
|
||||
if(highestPrice != gLastHighestPrice)
|
||||
{
|
||||
ObjectDelete(current_chart_id, obj_name);
|
||||
}
|
||||
ObjectCreate(current_chart_id, obj_name, OBJ_HLINE, 0, iTime(gSymbol,_Period,0), gLastHighestPrice);
|
||||
|
||||
//--- set color to Red
|
||||
ObjectSetInteger(current_chart_id, obj_name, OBJPROP_COLOR, clrRed);
|
||||
//--- set object width
|
||||
ObjectSetInteger(current_chart_id, obj_name, OBJPROP_WIDTH, 1);
|
||||
//--- Move the line
|
||||
ObjectMove(current_chart_id, obj_name, 0, iTime(gSymbol,_Period,0), gLastHighestPrice);
|
||||
|
||||
highestPrice = gLastHighestPrice;
|
||||
|
||||
Print("Drawing line");
|
||||
}
|
||||
//+------------------------------------------------------------------+
|
||||
Reference in New Issue
Block a user