A request that was addressed to ProRealTime:
Dear Sir or Madame,
I opened the account via the prorealtime homepage with IG Markets and would kindly like to ask for writing a code for trading system as follows:
Parameter
– Currency pair: AUD/USD (or other major pairs)
– 3 Min Candle Chart
– EMA 200
– Parabolic SAR (using the standard setting)
– Stochastic Indicator (13 ; 8 ; 3) / horizontal lines in the indicator are located at 25 (instead of 20) on the bottom and 75 (instead of 80) on the top
– Trading Hours 08:05 o’clock German time until 15:25 o’clock German time and 15:35 o’clock until 21:45 o’clock
Long Order
• The current candle stick is trading above the EMA 200.
• Parabolic SAR is plotting below the current candle (green for uptrend).
• Stochastic is confirming the above with crossing upward (preferably the lines have crossed below the 25 horizontal line already)
If the above conditions are all fulfilled, then:
• Buy 0,1 Lot (mini-Lot) with the open of the next candlestick.
• Stop-Loss is placed 2 pips below the Parabolic SAR.
• Target is 10 pips (might be changed, just do not know which is the best target at the moment but I assume that amending the target should be possible without difficulties).
• The Stop-Loss is a trailing stop which should be plotted always two pips below the Parabolic SAR.
• Position is closed when the price reaches the target or the stop loss.
Short Order
• The current candle stick is trading below the EMA 200.
• Parabolic SAR is plotting above the current candle (red for downtrend).
• Stochastic is confirming the above with crossing downward (preferably the lines have crossed above the 75 horizontal line already)
If the above conditions are all fulfilled, then:
• Sell 0,1 Lot (mini-Lot) with the open of the next candlestick.
• Stop-Loss is placed 2 pips above the Parabolic SAR.
• Target is 10 pips (might be changed, just do not know which is the best target at the moment but I assume that amending the target should be possible without difficulties).The Stop-Loss is a trailing stop which should be plotted always two pips above the Parabolic SAR.
• Position is closed when the price reaches the target or the stop loss.
Trust the above is understandable. If you have any questions please contact me.
Thank you very much in advance and look forward to hearing from you.
Suggestion for an anwser:
ParabolicSAR=SAR[0.02,0.02,0.2]
EMA200=ExponentialAverage[200](close)
mystoch=Stochastic[13,8](close)
tradingtime=(time >= 080500 and time <152500) or (time >=153500 and time < 214500)
c1=close > EMA200
c2=close > ParabolicSAR
c3=mystoch crosses over 75
if not longonmarket and tradingtime and c1 and c2 and c3 then
buy 0.1 share at market
sell at ParabolicSAR-2*pointsize stop
set target pprofit 10
endif
if longonmarket then
sell at ParabolicSAR-2*pointsize stop
endif
c4=close < EMA200
c5=close < ParabolicSAR
c6=mystoch crosses under 75
if not shortonmarket and tradingtime and c4 and c5 and c6 then
sellshort 0.1 share at market
exitshort at ParabolicSAR+2*pointsize stop
set target pprofit 10
endif
if shortonmarket then
exitshort at ParabolicSAR+2*pointsize stop
endif
if not tradingtime then
sell at market
exitshort at market
endif