Richiesta indicatore

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #45267 quote
    massimo mamprinmassimo mamprin
    Participant
    Junior

    Buongiorno a tutti

    devo  scrivere codice per tracciare degli swing sui grafici

    chi mi può aiutare ?

    Mi interessa creare l’indicatore allegato in foto

    grazie

    #45291 quote
    Leonida1984Leonida1984
    Participant
    Average

    Buongiorno MAssimo, non c’è alcuna foto.

    Buona Domenica!

    #45349 quote
    MarcoMarco
    Participant
    Junior

    buongiorno anche io sono interessato all’inidicatore Gann Swing.

    questo è un codice programma trovato sul web ma mi da dei problemi con prorealtime.  c’è qualcuno che puo risolvere gli errori??

    inputs: filter(2), stats(0);
    vars  : xBar(0) , xHigh(0), xLow(0), xCount(0), xSwitch(0);
    vars  : xSkip(0), xConfirm(0);
    vars  : pBar(0) , pHigh(0), pLow(0);
    vars  : bFirst(1);
    
    if xSwitch = 0  then
     begin
      if High >= xHigh then
       begin
        xHigh  = High;
        xLow   = Low;
        xBar   = BarNumber;
        xSkip  = 0;
       end
      else
       begin
        xSkip  = xSkip + 1;
        if xSkip      >= filter then
         begin
           xConfirm    = 1;
           xCount      = 1;
           while xCount < filter
            begin
             if (Low[xCount] <= Low[xCount-1]) or (xLow <= Low[filter-1])
    then
               begin
                xCount   = filter;
                xConfirm = 0;
               end;
             xCount      = xCount + 1;
            end;
           if xConfirm   = 1 then
            begin
              xSwitch = 1;
              if stats = 0 then
                 plot1[BarNumber-xBar](xHigh,"Swing")
              else
               begin
                if bFirst = 0 then
                 begin
                   plot2[BarNumber-xBar](xHigh-pLow,"Range");
                   plot3[BarNumber-xBar](xBar -pBar,"Duration");
                 end;
                 bFirst = 0;
               end;
              pHigh   = xHigh;
              pLow    = xLow;
              pBar    = xBar;
              xHigh   = High;
              xLow    = Low;
              xBar    = BarNumber;
              xSkip   = 0;
            end;
         end;
       end;
     end
    else
     begin
      if Low <= xLow then
       begin
        xHigh = High;
        xLow  = Low;
        xBar  = BarNumber;
        xSkip = 0;
       end
      else
       begin
        xSkip = xSkip + 1;
        if xSkip >= filter then
         begin
          xConfirm = 1;
          xCount   = 1;
          while xCount < filter
            begin
             if (High[xCount] >= High[xCount-1]) or (xHigh >=
    High[filter-1]) then
              begin
               xCount   = filter;
               xConfirm = 0;
              end;
             xCount   = xCount + 1;
            end;
          if xConfirm = 1 then
           begin
             xSwitch = 0;
             if stats = 0 then
               plot1[BarNumber-xBar](xLow,"Swing")
             else
              begin
               plot2[BarNumber-xBar](pHigh-xLow,"Range");
               plot3[BarNumber-xBar](xBar -pBar,"Duration");
              end;
             pHigh   = xHigh;
             pLow    = xLow;
             pBar    = xBar;
             xLow    = Low;
             xHigh   = High;
             xBar    = BarNumber;
             xSkip   = 0;
           end;
         end;
       end;
     end;
    
    if ((date = lastcalcdate) and (time = lastcalctime)) then
     begin
      if xSwitch = 0 then
       begin
         if stats = 0 then
           plot1[BarNumber-xBar](xHigh,"Swing")
         else
           begin
             plot2[BarNumber-xBar](xHigh-pLow,"Range");
             plot3[BarNumber-xBar](xBar -pBar,"Duration");
           end;
       end
      else
       begin
         if stats = 0 then
           plot1[BarNumber-xBar](xLow,"Swing")
         else
           begin
             plot2[BarNumber-xBar](pHigh-xLow,"Range");
             plot3[BarNumber-xBar](xBar -pBar,"Duration");
           end;
       end;
    end;
    inputs: filter(2), stats(0);
    vars  : xBar(0) , xHigh(0), xLow(0), xCount(0), xSwitch(0);
    vars  : xSkip(0), xConfirm(0);
    vars  : pBar(0) , pHigh(0), pLow(0);
    vars  : bFirst(1);
    
    if xSwitch = 0  then
     begin
      if High >= xHigh then
       begin
        xHigh  = High;
        xLow   = Low;
        xBar   = BarNumber;
        xSkip  = 0;
       end
      else
       begin
        xSkip  = xSkip + 1;
        if xSkip      >= filter then
         begin
           xConfirm    = 1;
           xCount      = 1;
           while xCount < filter
            begin
             if (Low[xCount] <= Low[xCount-1]) or (xLow <= Low[filter-1])
    then
               begin
                xCount   = filter;
                xConfirm = 0;
               end;
             xCount      = xCount + 1;
            end;
           if xConfirm   = 1 then
            begin
              xSwitch = 1;
              if stats = 0 then
                 plot1[BarNumber-xBar](xHigh,"Swing")
              else
               begin
                if bFirst = 0 then
                 begin
                   plot2[BarNumber-xBar](xHigh-pLow,"Range");
                   plot3[BarNumber-xBar](xBar -pBar,"Duration");
                 end;
                 bFirst = 0;
               end;
              pHigh   = xHigh;
              pLow    = xLow;
              pBar    = xBar;
              xHigh   = High;
              xLow    = Low;
              xBar    = BarNumber;
              xSkip   = 0;
            end;
         end;
       end;
     end
    else
     begin
      if Low <= xLow then
       begin
        xHigh = High;
        xLow  = Low;
        xBar  = BarNumber;
        xSkip = 0;
       end
      else
       begin
        xSkip = xSkip + 1;
        if xSkip >= filter then
         begin
          xConfirm = 1;
          xCount   = 1;
          while xCount < filter
            begin
             if (High[xCount] >= High[xCount-1]) or (xHigh >=
    High[filter-1]) then
              begin
               xCount   = filter;
               xConfirm = 0;
              end;
             xCount   = xCount + 1;
            end;
          if xConfirm = 1 then
           begin
             xSwitch = 0;
             if stats = 0 then
               plot1[BarNumber-xBar](xLow,"Swing")
             else
              begin
               plot2[BarNumber-xBar](pHigh-xLow,"Range");
               plot3[BarNumber-xBar](xBar -pBar,"Duration");
              end;
             pHigh   = xHigh;
             pLow    = xLow;
             pBar    = xBar;
             xLow    = Low;
             xHigh   = High;
             xBar    = BarNumber;
             xSkip   = 0;
           end;
         end;
       end;
     end;
    
    if ((date = lastcalcdate) and (time = lastcalctime)) then
     begin
      if xSwitch = 0 then
       begin
         if stats = 0 then
           plot1[BarNumber-xBar](xHigh,"Swing")
         else
           begin
             plot2[BarNumber-xBar](xHigh-pLow,"Range");
             plot3[BarNumber-xBar](xBar -pBar,"Duration");
           end;
       end
      else
       begin
         if stats = 0 then
           plot1[BarNumber-xBar](xLow,"Swing")
         else
           begin
             plot2[BarNumber-xBar](pHigh-xLow,"Range");
             plot3[BarNumber-xBar](xBar -pBar,"Duration");
           end;
       end;
    end;
    GannSwing_Ind.jpg GannSwing_Ind.jpg
    #45368 quote
    Leonida1984Leonida1984
    Participant
    Average
    inputs: filter(2), stats(0);
    vars  : xBar(0) , xHigh(0), xLow(0), xCount(0), xSwitch(0);
    vars  : xSkip(0), xConfirm(0);
    vars  : pBar(0) , pHigh(0), pLow(0);
    vars  : bFirst(1);
    Questa parte non va dichiarata su Prorealtime.
    Inoltre devi togliere tutte le punteggiature  (;)
    #45370 quote
    Leonida1984Leonida1984
    Participant
    Average

    Devi assegnare un valore alla variabile begin. Anche se a intuito penso vada tolta.

    #45372 quote
    MarcoMarco
    Participant
    Junior

    ciao grazie mi da anche un errore su end???

    #45374 quote
    MarcoMarco
    Participant
    Junior

    mi da anche un errore sulla riga 28 carattere 6 mid ice  ” uno di questi caratteri mi sembra piu appropriato di [   usa la  ” ,”  o ” =”

    #45413 quote
    Leonida1984Leonida1984
    Participant
    Average

    Ci sarà sicuramente qualche end in più o in meno. Verifica.

    buona giornata!

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Richiesta indicatore


Supporto Piattaforma: Grafici, Dati e Broker

New Reply
Author
Summary

This topic contains 7 replies,
has 3 voices, and was last updated by Leonida1984Leonida1984
9 years, 2 months ago.

Topic Details
Forum: Supporto Piattaforma: Grafici, Dati e Broker
Language: Italian
Started: 09/03/2017
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...