'{' - function definition unexpected

 

Bonjour, je n'arrive pas a resoudre ce message d'erreur, pouvez vous m'aider? SVP

ERREUR: '{' - function definition unexpected 13  3


merci d'avance 

//+------------------------------------------------------------------+

//|                                                       SANANE.mq5 |

//|                                  Copyright 2022, MetaQuotes Ltd. |

//|                                             https://www.mql5.com |

//+------------------------------------------------------------------+

#property copyright "Copyright 2022, MetaQuotes Ltd."

#property link      "https://www.mql5.com"

#property version   "1.00"

//+------------------------------------------------------------------+

//| Expert initialization function                                   |

//+------------------------------------------------------------------+


  {

   int OnInit()(overlay=true)



   sae = input(true, title="A")

   sce = input(true, title="B")

   st = input(true, title="C")

   def = input(false, title="D")

   pa = input(true, title="E")

   sl = input(false, title="F")



//EMA Definitions

   emaSlow = ema(close, 62)

   emaFast = ema(close, 38)


//Aggressive Entry or Alert To Potential Trade

   pullbackUpT() => emaFast > emaSlow and close < emaFast

   pullbackDnT() => emaFast < emaSlow and close > emaFast


//Conservative Entry Code For Highlight Bars

   entryUpT() => emaFast > emaSlow and close[1] < emaFast and close > emaFast

   entryDnT() => emaFast < emaSlow and close[1] > emaFast and close < emaFast


//Conservative Entry True/False Condition

   entryUpTrend = emaFast > emaSlow and close[1] < emaFast and close > emaFast ? 1 : 0

   entryDnTrend = emaFast < emaSlow and close[1] > emaFast and close < emaFast ? 1 : 0


//Define Up and Down Trend for Trend Arrows at Top and Bottom of Screen

   upTrend = emaFast >= emaSlow

   downTrend = emaFast < emaSlow


//Definition for Conseervative Entry Up and Down PlotArrows

   codiff = entryUpTrend == 1 ? entryUpTrend : 0

   codiff2 = entryDnTrend == 1 ? entryDnTrend : 0


//Color definition for Moving Averages

   col = emaFast > emaSlow ? lime : emaFast < emaSlow ? red : yellow


//Moving Average Plots and Fill

   p1 = plot(emaSlow, title="Slow MA", style=linebr, linewidth=4, color=col)

   p2 = plot(emaFast, title="Slow MA", style=linebr, linewidth=2, color=col)

   fill(p1, p2, color=silver, transp=50)


//Aggressive Entry, Conservative Entry Highlight Bars

   barcolor(sae and pullbackUpT() ? yellow : sae and pullbackDnT() ? yellow : na)

   barcolor(sce and entryUpT() ? aqua : sce and entryDnT() ? aqua : na)


//Trend Triangles at Top and Bottom of Screen

   plotshape(st and upTrend ? upTrend : na, title="Conservative Buy Entry Triangle",style=shape.triangleup, location=location.bottom, color=lime, transp=0, offset=0)

   plotshape(st and downTrend ? downTrend : na, title="Conservative Short Entry Triangle",style=shape.triangledown, location=location.top, color=red, transp=0, offset=0)


//Plot Arrows OR Letters B and S for Buy Sell Signals

   plotarrow(pa and codiff ? codiff : na, title="Up Entry Arrow", colorup=lime, maxheight=30, minheight=30, transp=0)

   plotarrow(pa and codiff2*-1 ? codiff2*-1 : na, title="Down Entry Arrow", colordown=red, maxheight=30, minheight=30, transp=0)

   plotchar(sl and codiff ? low - tr : na, title="Buy Entry", offset=0, char='A', location=location.absolute, color=black, transp=0)


//+------------------------------------------------------------------+

Discover new MetaTrader 5 opportunities with MQL5 community and services
Discover new MetaTrader 5 opportunities with MQL5 community and services
  • 2022.11.22
  • www.mql5.com
MQL5: language of trade strategies built-in the MetaTrader 5 Trading Platform, allows writing your own trading robots, technical indicators, scripts and libraries of functions
 

Veuillez insérer le code correctement. Utilisez le bouton correspondant sur le panneau de l'éditeur


je viens de réinsérer ton code

Raison: