Strategia suddivisa per giorni
- This topic has 6 replies, 3 voices, and was last updated 3 years ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
Similar topics:
Forums › ProRealTime forum Italiano › Supporto ProOrder › Strategia suddivisa per giorni
Buonasera, sto creando una startegia che dovrebbe fare i suoi ingressi differenti per orgni gorno della settimana, cerco di spiegarmi.
per il lunedi ho una strategia, per il martedi un’altra e cosi via per tutti i giorni della settiama, come posso fare per poter scrivere questo codice , grazie.
If Day = 1 and BuyCond Then // Sun = 0, Mon = 1, Sat = 6
Buy at Market
Endif
Il suggerimento di GraHal va benissimno, devi solo usare DayOfWeek invece di Day. Dovrai ripetere quelle istruzuioni per i giorni e le strategie che desideri:
|
1 2 3 4 5 6 7 8 9 10 11 |
If DayOfWeek = 1 and BuyCond1 Then BUY at Market Endif If DayOfWeek = 2 and BuyCond2 Then BUY at Market Endif If DayOfWeek = 3 and BuyCond3 Then BUY at Market Endif . . |
se dovessi imostare una condizione, la strategia non deve entrare a mercato se tra il prezzo di apertuara e il prezzo corrente c’è uno scostamento maggiore del 1,2%, come dovrei fare?
Devi metterla tra le tue condizioni:
|
1 2 3 4 5 6 |
BuyCond1a = Not OnMarket BuyCond1b = ((abs(close / open) - 1) * 100) < 1.2 //differenza < 1.2% BuyCond1 = BuyCond1a AND BuyCond1b If DayOfWeek = 1 and BuyCond1 Then BUY at Market Endif |
Find exclusive trading pro-tools on