İş tamamlandı
İş Gereklilikleri
The below are required for a fully automated trading strategy. Using the Stochastic/MACD/Aroon attached (I will be changed the variables in these).
All states can only change at time period change (default is 30min chart but would like this to change per chart)
User variables
low1, high1, deadzone1, buy1, sell1, aroonhigh, aroonlow, aroongap, aroongap2
Stochastic
If Slow has had a previous close under low1 and subsequently either slow or fast line goes above low1 trigger buy1 until fast line goes above high1 (when this occurs clear state)
If High has had a previous close over high1 and subsequently either slow or fast line goes below high1 trigger sell1 until fast line goes below low1 (when this occurs clear state)
MACD
If round(to 2dp) of Histogram (MACD-Signal) is > deadzone1 then trigger buy1
If round(to 2dp) of Histogram (MACD-Signal) is <- deadzone1 then trigger sell1
If round(to 2dp) of Histogram (MACD-Signal) is < deadzone1 and >-deadzone then maintain previous state
Aroon
If and(aroonup>aroondown, aroonup>aroonhigh, aroonup-aroondown>aroongap) then trigger buy1
If and(aroondown>aroonup, aroondown>aroonhigh, aroondown-aroonup>aroongap) then trigger sell1
If previous state was buy3 and Aroonup>aroondown+aroongap2 then keep state as buy3 else clear state
If previous state was sell3 and Aroondown>aroonup+aroongap2 then keep state as sell3 else clear state
To trade
count buy1
count sell1
No open position
If sum buy1>and(sum sell1, 1) BUY 1*lotsize
If sum sell1>and(sum buy1, 1) SELL 1*lotsize
If open sell position
If sum buy1>and(sum sell1, 1) BUY 2*lotsize
If sum sell1>and(sum buy1, 1) Keep current position open
If neither of the above apply BUY 1*lotsize
If open buy position
If sum buy1>and(sum sell1, 1) Keep current position open
If sum sell1>and(sum buy1, 1) SELL 2*lotsize
If neither of the above apply SELL 1*lotsize