Maurizio-Ciullo

Study Range Threshold Prev Session

Dec 12th, 2025
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.                                                                   // Study Range Threshold Prev Session  //
  3.                                                          // Vedi Anche Versione Indicatore Range Threshold Prev Session //
  4.  
  5.  
  6. // ===============================================================
  7. // Study Range Threshold Prev Session
  8. // Versione Unificata con Input LONG e SHORT Separati
  9. // ===============================================================
  10.  
  11. // ==================== INPUT ======================
  12. Inputs:
  13.     dollarThrehold_Long(200),   // soglia in DOLLARI per LONG
  14.     dollarThrehold_Short(200),  // soglia in DOLLARI per SHORT
  15.     BPV(50),                    // Inserisci il big point value ES: @S = 50$ / Big Point Value per Long Per Crypto 1$
  16.     Only_Long(false),           // mostra SOLO logica Long
  17.     Only_Short(false);          // mostra SOLO logica Short
  18.  
  19.  
  20. // ==================== VARIABILI ===================
  21. Vars:
  22.     highPrevSession(0),
  23.     lowPrevSession(0),
  24.  
  25.     priceThreholdLong(0),
  26.     priceThreholdShort(0),
  27.  
  28.     sogliaPrezzoLong(0),
  29.     sogliaPrezzoShort(0);
  30.  
  31.  
  32.  
  33. // ===============================================================
  34. // ========================= LOGICA LONG =========================
  35. // ===============================================================
  36.  
  37. if not Only_Short then
  38. begin
  39.  
  40.     // soglia in punti (conversione da dollari a punti)
  41.     priceThreholdLong = dollarThrehold_Long / BPV;
  42.  
  43.     // massimo sessione precedente
  44.     highPrevSession = HighSession(1,1);
  45.  
  46.     // soglia sopra il massimo
  47.     sogliaPrezzoLong = highPrevSession + priceThreholdLong;
  48.  
  49.     // =================== PLOT LONG ======================
  50.     Plot1(highPrevSession, "HighPrevSess_L");
  51.     Plot2(sogliaPrezzoLong, "Soglia+$");
  52.     Plot3(HighSession(1,0), "HighSessCorr_L");
  53.  
  54.     // colori
  55.     SetPlotColor(1, Blue);     // max sessione precedente
  56.     SetPlotColor(2, Red);      // soglia max + $
  57.     SetPlotColor(3, Green);    // max sessione corrente
  58.  
  59.     SetPlotWidth(1, 1);
  60.     SetPlotWidth(2, 2);
  61.     SetPlotWidth(3, 2);
  62.  
  63. end;
  64.  
  65.  
  66.  
  67. // ===============================================================
  68. // ========================= LOGICA SHORT ========================
  69. // ===============================================================
  70.  
  71. if not Only_Long then
  72. begin
  73.  
  74.     // soglia in punti (conversione dollari → punti)
  75.     priceThreholdShort = dollarThrehold_Short / BPV;
  76.  
  77.     // minimo sessione precedente
  78.     lowPrevSession = LowSession(1,1);
  79.  
  80.     // soglia sotto il minimo
  81.     sogliaPrezzoShort = lowPrevSession - priceThreholdShort;
  82.  
  83.     // =================== PLOT SHORT ======================
  84.     Plot4(lowPrevSession, "LowPrevSess_S");
  85.     Plot5(sogliaPrezzoShort, "Soglia-$");
  86.     Plot6(LowSession(1,0), "LowSessCorr_S");
  87.  
  88.     // colori
  89.     SetPlotColor(4, Blue);     // min sessione precedente
  90.     SetPlotColor(5, Red);      // soglia min - $
  91.     SetPlotColor(6, Green);    // min sessione corrente
  92.  
  93.     SetPlotWidth(4, 1);
  94.     SetPlotWidth(5, 2);
  95.     SetPlotWidth(6, 2);
  96.  
  97. end;
  98.  
  99.  
  100.  
Advertisement
Add Comment
Please, Sign In to add comment