Proback test - opening and closing a day too late!

martyloo

Newbie
3 0
I want the system to buy when
Condition 1 - the price is above its 200 moving day average
Condition 2 - the RSI dips below or is equal to 5
Close the position when the price crosses above its 5 day moving average.

I want the system to sell when
Condition 1 - The price is below its 200 moving day average
Condition 2 - The RSI dips above or is equal to 95
Close the position when the price crosses under its 5 day moving average.

RSI period 2

Where as the below code waits till the next day to open and close a position I need it to do the very next day.

Can you help?

// Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated

// Conditions to enter long positions
indicator1 = close
indicator2 = Average[200](close)
c1 = (indicator1 > indicator2)

indicator3 = RSI[2](close)
c2 = (indicator3 <= 5)

IF c1 AND c2 THEN
BUY 2 PERPOINT AT MARKET
ENDIF

// Conditions to exit long positions
indicator4 = close
indicator5 = Average[5](close)
c3 = (indicator4 CROSSES OVER indicator5)

IF c3 THEN
SELL AT MARKET
ENDIF

// Conditions to enter short positions
indicator6 = close
indicator7 = Average[200](close)
c4 = (indicator6 < indicator7)

indicator8 = RSI[2](close)
c5 = (indicator8 >= 95)

IF c4 AND c5 THEN
SELLSHORT 2 PERPOINT AT MARKET
ENDIF

// Conditions to exit short positions
indicator9 = close
indicator10 = Average[5](close)
c6 = (indicator9 CROSSES UNDER indicator10)

IF c6 THEN
EXITSHORT AT MARKET
ENDIF

// Stops and targets
 

gerryg

Established member
900 6
Dude, spend 30 bucks and hire freelancer to deal with that.. Are you coder or trader? I ordered almost 20 customizations for my Hot forex stuff. Though it cost me only 400$, I made 5K on it.
 

martyloo

Newbie
3 0
Dude, spend 30 bucks and hire freelancer to deal with that.. Are you coder or trader? I ordered almost 20 customizations for my Hot forex stuff. Though it cost me only 400$, I made 5K on it.

Trader but trying to learn to code, didn't realise it was that cheap!?

Where can I hire a freelancer to do it for me?
 
 
AdBlock Detected

We get it, advertisements are annoying!

But it's thanks to our sponsors that access to Trade2Win remains free for all. By viewing our ads you help us pay our bills, so please support the site and disable your AdBlocker.

I've Disabled AdBlock