I am trying to code a strategy with parameters as below:
Assumption: The range (or box) created with both “highest” and “lowest” in the period 00h00 – 06h00 (London Time) is supposed to be filled during western sessions (London, NY).
Ordering: BUY: Price crosses over the “lowest” of the range / BUY EXIT: Price = “highest” of the range / SELL: Price crosses under the “lowest” of the range / SELL EXIT: Price = “lowest” of the range.
Frequency: Each day, only 1 possibilty: BUY or SELL or no trade (no trade if the price don’t need liquidity on support/resistance-levels created by the range and moves linearly up- or downside).
Scope of Use: Forex-Main Currencies, excepted the most active ones during the range (JPY, AUD, NZD) – To be checked!
I would be very thankful for each help and would share with you the afterwards optimization of this strategy (for example, by adding a stochastic or price-action-parameters).
Thanks & Regards
INDICATOR:
1
2
3
4
5
6
7
8
9
10
11
12
ifintradaybarindex=0then
maxprice=0
minprice=close*100
endif
tcondition=time>=010000andtime<=070000
iftconditionthen
maxprice=max(maxprice,high)
minprice=min(minprice,low)
endif
returnmaxprice,minprice
AUTO-TRADING:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Festlegen der Code-Parameter
DEFPARAMCumulateOrders=False// Kumulieren von Positionen deaktiviert
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.