Attachments forums

List of attachments posted on this forum.


All files on forums: 160949

Re: Already Converted TradingView Indicators to MT4 Indicators

nwesterhuijs, Mon May 12, 2025 9:11 pm

Pipa wrote: Fri May 09, 2025 11:59 pm Hi guys,

I'm still enjoying my long vaca, but noticed this great indicator. Replace the void DrawDirectionArrow() with the following and your fine:

Code: Select all

void DrawDirectionArrow()
{
   if(!ShowArrow) return;
   
   string ArrowName = "LRVP_DirectionArrow";
   if(ObjectFind(0, ArrowName) < 0)
   {
      ObjectCreate(0, ArrowName, OBJ_ARROW, 0, 0, 0);
      ObjectSetInteger(0, ArrowName, OBJPROP_FONTSIZE, FontSizeArrows);
      ObjectSetInteger(0, ArrowName, OBJPROP_BACK, false);
   }
   
   datetime TimeHands = iTime(NULL, 0, CalculationLength-1);
   double PriceHands = Tilt > 0 ? StartingPrice + ATR * (NumberOfLevels + 1) : StartingPrice - ATR * (NumberOfLevels + 1);
   int TextArrows = Tilt > 0 ? 242 : 241;
   color ColorArrows = Tilt > 0 ? DownTrendColor: UpTrendColor;
   
   ObjectSetInteger(0, ArrowName, OBJPROP_ARROWCODE, TextArrows);
   ObjectSetInteger(0, ArrowName, OBJPROP_COLOR, ColorArrows);
   ObjectMove(0, ArrowName, 0, TimeHands, PriceHands);
}
Or download the 'fixed' versions:

LR_Volume Profile_Eng.mq4LR_Volume Profile_Eng.ex4
I was interested to see how this indie would look a few bars back without using the backtesting option, maybe others share the same curiosity.

If the first variable is set to X (something greater than 0), it will move the analysis X bars back in time and it will draw a vertical line here to allow the user to see what the last input bar is. Of course set the first variable to "0" and it will use the current bar as last input bar, just as the original version.
All files in topic