Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Study Session Last Bar Tradestation //
- // Individua l'ultima barra della sessione su grafico intraday //
- // Questo Sistema Conta Le barre Perchè E' Più Facile Fargli Capire Determinate Ore Quando Cambia Giornata //
- // SessionLastBar Di Multicharts Viene Sostituito Dalla Riga Di Codice Che Segue //
- // Il conteggio delle barre parte da 0 che cade sull'ultima barra di sessione per avanzare di uno ad ogni barra successiva //
- // Questo plot verifica sia SessionLastbar sia il mycount che conta le candele a partire da SessionLastBar per poi riazzerandole ogni volta.
- // Dayofweek(Date) Per la settimana borsistica va da 0 a 5 Per le criptovalute da 0 a 7.
- // Mycount va da da 0 a 23 su timeframe orario.
- Var:
- SessionLastbar(0);
- { *** INIZIO VERSIONE ORIGINALE COUTER DI SESSIONE NON SEMBRA ESSERE SINCRONIZZATA ***
- if Time = (SessionEndTime( 0 , CurrentSession(0))) then SessionLastbar = 100 else SessionLastbar = 0;
- If SessionLastbar = 100 then mycount = 0; // Uso 100 Al Posto Di True Perchè Altrimenti Mi ritorna Errore !!! .
- mycount = mycount + 1;}
- //*** FINE VERSIONE ORIGINALE COUTER DI SESSIONE NON SEMBRA ESSERE SINCRONIZZATA ***
- // *** INIZIO VERSIONE SECONDARIA COUTER DI SESSIONE SEMBRA ESSERE SINCRONIZZATA ***
- if Time = (SessionEndTime( 0 , CurrentSession(0))) then SessionLastbar = 0 else SessionLastbar = SessionLastbar + 1;
- If SessionLastbar = 0 then mycount = -1; // Controllare se mettere then mycount = 0 opure mycount = - 1 dato che mi ritorna 1 invece di 0 vedi plot !!! .
- mycount = mycount + 1;
- // *** FINE VERSIONE SECONDARIA COUTER DI SESSIONE SEMBRA ESSERE SINCRONIZZATA ***
- {plot1(CurrentSession(0));
- plot2(Time);
- plot3(Sessionendtime(0, currentsession(0)));}
- plot4(SessionLastbar);
- plot5(mycount);
- plot6(Dayofweek(Date));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement