Hi, can someone show me a simple code to detect hourly bias? day of week bias? Monthly bias?
Thank you
Do you if the market is ascending or descending? : Price or moving average difference between 2 periods.
Hi Nicolas,
no I would like to detect for example, if gold go long every friday in the mornig (for example from 08:00 to 13:00).
I would like get a system that allow me to detect, with optimization, the best day or hour to go long or short and the best day or hour to close positions.
Hi Roberto,
no I would like to detect for example, if gold go long every friday in the mornig (for example from 08:00 to 13:00).
I would like get a system that allow me to detect, with optimization, the best day or hour to go long or short and the best day or hour to close positions.
Like This
//////////////////// ******************** Elenco Festività Ricorrenti in cui non si opera ******************** ////////////////////
Capodanno = OpenMonth = 1 and OpenDay = 1
PrimoMaggio = OpenMonth = 5 and OpenDay = 1
VIGILIA = OpenMonth = 12 and OpenDay = 24
NATALE = OpenMonth = 12 and OpenDay = 25
UltimoAnno = OpenMonth = 12 and OpenDay = 31
/// ***Elenco Festività TEDESCHE - Aggiungere alle ricorrenti se si opera sul DAX *** ///
//UNITATEDESCA = OpenMonth = 10 and OpenDay = 3
/// *********************************************************************************///
FesteNatalizie = (OpenMonth = 12 and (OpenDay = 23 or OpenDay = 24 or OpenDay = 25 or OpenDay = 26 or OpenDay = 27 or OpenDay = 28 or OpenDay = 29 or OpenDay = 30)) or (OpenMonth = 1 and (OpenDay = 2 or OpenDay = 3 or OpenDay = 4 or OpenDay = 5 or OpenDay = 6))
FesteRicorrenti = Capodanno or PrimoMaggio or VIGILIA or NATALE or UltimoAnno or FesteNatalizie
////////// ********** Finestra Temporale in cui si opera ********** //////////
Venerdi = OpenDayofWeek = 5
Finestra= (currenttime >= Start and currenttime <= End) and not (Venerdi and CurrentTime >= 185900)
//*************************************************************************//
////////// ********** Chiusura il Venerdì ********** //////////
VenerdiChiusura = opendayofweek=5 and currenttime > 205900
EndTime = currenttime >= End //variabile tra 00:00 e 24:00
StartTime = currenttime >= Start //variabile tra 00:00 e 24:00
Size = 1
/// ******************************************************* ///
//
////////// ********** CONDIZIONI PER ENTRARE CON POSIZIONI LONG ********** //////////
IF not FesteRicorrenti and Finestra and CurrentHour >= StartTime THEN
BUY size contract AT Market
SET STOP pLOSS STOPLong
SET TARGET PPROFIT TAKELong
ENDIF
//
////////// ********** CONDIZIONI PER USCIRE DA POSIZIONI LONG ********** //////////
IF LongOnMarket and VenerdiChiusura or EndTime Then
Sell size contract at market
endif
You might want to take a look at this:
Pathfinder swing TS
I just see but I can’t see the code of this system. Can you help me?
Add the desired variables to the optimizer panel, then select which one is fixed and which one has to be optimized. Is that what you mean?
If you mean machine learning, instead, well… you can find some topics in this forum, but it’s not and easy task and it will take plenty of time! (I have never tried to code it, due to lack of time).
can’t see the code of this system
follow the link then click View All Attachments at the top, you’ll find all the ITFs