Hi, I would like to convert this code to easy lenguaje
I have been backtesting in tradingview, no repaints, I would like some help to convert to easylenguaje for get more data
The code is this
strategy("V Bottom/Top Pattern [Misu]", shorttitle="V pattern [Misu]", overlay=true, initial_capital=50000, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// import Fontiramisu/fontLib/80 as fontilab
import Fontiramisu/fontilab/8 as fontilab
// -------- Find dev pivots ---------- [
// -- Var user input --
var devTooltip = "Deviation is a multiplier that affects how much the price should deviate from the previous pivot in order for the bar to become a new pivot."
var depthTooltip = "The minimum number of bars that will be taken into account when analyzing pivots."
thresholdMultiplier = input.float(title="Deviation", defval=3.1, step=0.1, minval=0, tooltip=devTooltip, group="Pivot")
depth = input.int(title="Depth", defval=8, minval=1, tooltip=depthTooltip, group="Pivot")
// Prepare pivot variables
var line lineLast = na
var int iLast = 0 // Index last
var int iPrev = 0 // Index previous
var float pLast = 0 // Price last
var float pLastHigh = 0 // Price last
var float pLastLow = 0 // Price last
var isHighLast = false // If false then the last pivot was a pivot low
isPivotUpdate = false
// Get pivot information from dev pivot finding function
[dupLineLast, dupIsHighLast, dupIPrev, dupILast, dupPLast, dupPLastHigh, dupPLastLow] =
fontilab.getDeviationPivots(thresholdMultiplier, depth, lineLast, isHighLast, iLast, pLast, true, close, high, low)
// Plot.
// Get last Pivots.
var highP = 0.0
var lowP = 0.0
var midP = 0.0
highP := isHighLast ? pLast : highP
lowP := not isHighLast ? pLast : lowP
midP := (highP + lowP)/2
// ] -------- Input Vars --------------- [.
breakoutTypeConf = input.string("Mid Pivot", title="Confirmation Type", options=["At First Break", "Mid Pivot", "Opposit Pivot", "No Confirmation"], group="Signal Type Confirmation")
lenghtSizeAvgBody = input.int(9, title="Lenght Avg Body", group="Breakouts Settings")
firstBreakoutFactor = input.float(0.2, step=0.1, title="First Breakout Factor", tooltip="Factor used to validate the first breakout of the V pattern", group="Breakouts Settings")
confBreakoutFactor = input.float(1.2, step=0.1, title="Confirmation Breakout Factor", tooltip="Factor used to validate the confirmation breakout of the V pattern", group="Breakouts Settings")
maxNbBarsValidV = input.int(11, title="Max Bars Confirmation", group="Timing Confirmation")
// ] -------- Logical Vars ------------- [
var _isVbottomPot = false
var _isVtopPot = false
_isVbottom = false
_isVtop = false
lastLow = 0.0
indexLow = 0
lastHigh = 0.0
indexHigh = 0
// Confirm V pattern vars.
var lHighVtopPot = 0.0
var lLowVbotPot = 0.0
var nbBarLVtopPot = 0
var nbBarLVbotPot = 0
var breakLevelVbotPot = 0.0
var breakLevelVtopPot = 0.0
// Confirm potential V bot pattern.
isBreakBarAvg = breakoutTypeConf != "No Confirmation" ? _body > _bodyAvg * confBreakoutFactor : true
vBotConfSrc = getBreakoutTypeConf(breakoutTypeConf, false)
_isVbottom := _isVbottomPot and ta.crossover(close, vBotConfSrc) and isBreakBarAvg
if _isVbottomPot
// Cond V pot invalidated or finished.
if not _isVbottom and low >= lLowVbotPot and nbBarLVbotPot <= maxNbBarsValidV
nbBarLVbotPot := nbBarLVbotPot + 1
else
_isVbottomPot := false
nbBarLVbotPot := 0
// Confirm potential V top pattern.
vTopConfSrc = getBreakoutTypeConf(breakoutTypeConf, true)
_isVtop := _isVtopPot and ta.crossunder(close, vTopConfSrc) and isBreakBarAvg
if _isVtopPot
// Cond V pot invalidated or finished.
if not _isVtop and high <= lHighVtopPot and nbBarLVtopPot <= maxNbBarsValidV
nbBarLVtopPot := nbBarLVtopPot + 1
else // reinit for next V patter.
_isVtopPot := false
nbBarLVtopPot := 0