Entre 20h30 et 21h00, acheter 1 contrat au marché
- This topic has 2 replies, 3 voices, and was last updated 1 year ago by .
		Viewing 3 posts - 1 through 3 (of 3 total)
	
	
		Viewing 3 posts - 1 through 3 (of 3 total)
	
	 Similar topics:
										Forums › ProRealTime English forum › ProOrder support › Entre 20h30 et 21h00, acheter 1 contrat au marché
 Iván.
Iván.Bonjour à tous,
Je souhaite écrire un programme, à mon avis tout simple, me permettant de faire acheter par la machine 1 contrat d’indice tous les jours entre 20h30 et 21h00 dans les conditions suivantes (sachant que l’unité de temps de trading (timeframe) est de 30mn):
CI-dessous le programme que j’ai écrit, qui apparemment ne comporte pas de faute de syntaxe, mais qui ne tourne pas
Un très grand merci si vous pouvez m’aider
Daniel
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Defparam Cumulateorders=false Defparam Flatbefore = 203000 Defparam Flatafter = 210000 //Conditions c1 = close [1] > open [1] c2 = close [2] > open [2] c3 = Time > 203000 AND TIME < 210000 IF NOT LongOnMarket AND c1 AND c2 AND c3 THEN BUY 1 SHARE AT MARKET ENDIF IF TRADEINDEX (0) > 1 THEN SELL AT MARKET ENDIF | 
Hi,
I don’t really understand how you want to use the stochastic, when you want to go “Long” it makes little sense to know if the stochastic is below 80, I would rather expect something like: If %K CrossesOver %D then…
The first part of your code will be going to look like:
If OpenTime=083000 and Close[1]>Open[1] and Close[2]>Open[2] and …
Buy 1 Share at Market
Please don’t duplicate topics. https://www.prorealcode.com/topic/entre-20h30-et-21h00-acheter-1-contrat-au-marche-2/
			Find exclusive trading pro-tools on 
