ERROR CON INDICADOR DE USUARIO NICOLAS

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #228973 quote
    gustavobp
    Participant
    New

    Buenos dias, tengo un problema con el indicador del usuario Nicolas, me da un error en la linea de codigo RETURN, ¿No deberia ser algo asi como RETURN GRAPH?

    el enlace al indicador es el siguiente:

    Imbalances indicator

    y el codigo es el siguiente:

    //PRC_Imbalances indicator
    //12.10.2023
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    
    defparam drawonlastbaronly=true
    
    REM Store support
    IF high[2] < low THEN
      $support[i]= high[2]
     $bar[i]=barindex
     i=i+1
    ENDIF
    
    REM Store resistance
    if high<low[2] then
     $res[y]= low[2]
     $resbar[y]=barindex
     y=y+1
    endif
    
    REM check support line
    if islastbarupdate and i>1 then
     for j = i-1 downto 0 
      checklow = $support[j]
      bars = max(1,barindex-$bar[j])
      endbar=barindex
      for z = bars downto 1
       if low[z]<checklow then
        endbar=barindex[z]
        break
       endif
      next
      if endbar<barindex then
       drawrectangle($bar[j]-2,low[max(0,barindex-$bar[j])],endbar,$support[j]) coloured("crimson",50) bordercolor(0,0,0,0)
      ELSE
       drawrectangle($bar[j]-2,low[max(0,barindex-$bar[j])],barindex,$support[j]) coloured("yellow",50) bordercolor(0,0,0,0)
      endif
     next
    endif
    
    REM check resistance line
    if islastbarupdate and y>1 then
     for j = y-1 downto 0
      checkhigh = $res[j]
      bars = max(1,barindex-$resbar[j])
      endbar=barindex
      for z = bars downto 1
       if high[z]>checkhigh then
        endbar=barindex[z]
        break
       endif
      next
      if endbar<barindex then
       drawrectangle($resbar[j]-2,high[max(0,barindex-$resbar[j])],endbar,$res[j]) coloured("lightgreen",50) bordercolor(0,0,0,0)
      ELSE
       drawrectangle($resbar[j]-2,high[max(0,barindex-$resbar[j])],barindex,$res[j]) coloured("cyan",50) bordercolor(0,0,0,0)
      endif
     next
    endif
    
    RETURN

     

    ¿Alguien puede ayudarme?

    Muchas gracias!!!

    #228985 quote
    robertogozzi
    Moderator
    Master

    La declaración RETURN sólo se puede utilizar en indicadores, no en otros lugares.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

ERROR CON INDICADOR DE USUARIO NICOLAS


ProOrder: Trading Automático y Backtesting

New Reply
Author
author-avatar
gustavobp @gustavobp Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
2 years ago.

Topic Details
Forum: ProOrder: Trading Automático y Backtesting
Language: Spanish
Started: 02/29/2024
Status: Active
Attachments: No files
Logo Logo
Loading...