//+------------------------------------------------------------------+
//| fibo.mq4 |
//| Copyright 2022, MetaQuotes Software Corp. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2022, MetaQuotes Software Corp."
#property link "https://www.mql5.com"
#property version "1.00"
#property strict
//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
{
int HighestCandle = iHighest(_Symbol,_Period,MODE_CLOSE,66,0);
int lowestCandle = iLowest(_Symbol,_Period,MODE_CLOSE,66,0);
int HighestCandle0 = iHighest(_Symbol,_Period,MODE_HIGH,10,2);
int LowestCandle0 = iLowest(_Symbol,_Period,MODE_LOW,10,2);
ObjectDelete("hightrend");
ObjectCreate(0,"hightrend",OBJ_FIBO,0,Time[HighestCandle],
Close[HighestCandle],Time[lowestCandle],Close[lowestCandle]);
// ObjectSetInteger(0,"hightrend",OBJPROP_COLOR,Red);
// ObjectSetInteger(0,"hightrend",OBJPROP_STYLE,STYLE_SOLID);
// ObjectSetInteger(0,"hightrend",OBJPROP_WIDTH,1);
//ObjectSetInteger(0,"hightrend",OBJPROP_RAY,true);
Comment("highest",Close[HighestCandle],"highest0",High[HighestCandle0],"\n lowestlow ",Low[lowestCandle], " low ",Low[LowestCandle0]);
};
//+------------------------------------------------------------------+