Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //////////////////////////////// Indicatore Study Sessione / InEntryWindow / PtnBaseSA ////////////////////////////////
- //////////////////////////////// Plot Session High & Low della Sessione Precedente / InEntryWindow / PtnBaseSA ////////////////////////////////
- Vars: PrevSessHigh(0), PrevSessLow(0);
- // Aggiorna solo se valori validi (inizio storico evita 0)
- If HighSession(1,1) <> 0 then
- PrevSessHigh = HighSession(1,1);
- If LowSession(1,1) <> 0 then
- PrevSessLow = LowSession(1,1);
- // Plot High e Low con colori distinti
- Plot1(PrevSessHigh, "PrevSessHigh");
- SetPlotColor(1, Green); // sessione superiore
- Plot2(PrevSessLow, "PrevSessLow");
- SetPlotColor(2, Red); // sessione inferiore
- //////////////////////////////// Indicatore Study Finestra Temporale Long ////////////////////////////////
- Inputs:
- EntryTimeLong(900),
- EndEntryTimeLong(1130);
- Vars:
- InEntryWindowLong(false);
- // Logica fascia temporale
- If EntryTimeLong < EndEntryTimeLong then
- InEntryWindowLong = (Time >= EntryTimeLong) and (Time <= EndEntryTimeLong)
- else
- InEntryWindowLong = (Time >= EntryTimeLong) or (Time <= EndEntryTimeLong);
- // Plot sul prezzo solo quando la finestra è attiva
- If InEntryWindowLong then
- Plot3(Close, "InEntryWindowLongClosePrice");
- // Plot booleano 0/1 sempre visibile
- Plot4(IFF(InEntryWindowLong, 1, 0), "InEntryWindowLong");
- // Colori
- SetPlotColor(3, Green); // Long window
- SetPlotColor(4, Green);
- //////////////////////////////// Indicatore Study Finestra Temporale Short ////////////////////////////////
- Inputs:
- EntryTimeShort(200),
- EndEntryTimeShort(400);
- Vars:
- InEntryWindowShort(false);
- // Logica fascia temporale
- If EntryTimeShort < EndEntryTimeShort then
- InEntryWindowShort = (Time >= EntryTimeShort) and (Time <= EndEntryTimeShort)
- else
- InEntryWindowShort = (Time >= EntryTimeShort) or (Time <= EndEntryTimeShort);
- // Plot sul prezzo solo quando la finestra è attiva
- If InEntryWindowShort then
- Plot5(Close, "InEntryWindowShortClosePrice");
- // Plot booleano 0/1 sempre visibile
- Plot6(IFF(InEntryWindowShort, 1, 0), "InEntryWindowShort");
- // Colori
- SetPlotColor(5, Red); // Short window
- SetPlotColor(6, Red);
- /////////////////////////////// PLOT PATTERN ///////////////////////////////
- Vars: highd0(0), highd1(0), PtnBaseSA20(false);
- // Valori sessioni
- highd0 = HighSession(0, 0);
- highd1 = HighSession(0, 1);
- // Condizione
- PtnBaseSA20 = (highd0 > highd1);
- // Plot semplice sopra la barra quando TRUE, niente linea a zero
- If PtnBaseSA20 then
- Plot7(High + MinMove * 2, "PtnSA20")
- else
- NoPlot(7);
- // Colore
- SetPlotColor(7, Blue); // pattern ora blu
Advertisement
Add Comment
Please, Sign In to add comment