ramaParticipant
Senior
I have written the code and works fine pro back test.
when place order in real system strategy is not starting
// Definition of code parameters
DEFPARAM CumulateOrders = true // Cumulating positions deactivated
// Conditions to enter short positions
c1 = (close <= close)
IF c1 THEN
SELLSHORT 1 PERPOINT AT MARKET
ENDIF
x=4
if shortonmarket then
sellshort 1 perpoint at tradeprice(1)-x stop
endif
if close >= 1.00019*tradeprice then
exitshort at market
endif
Your c1 looks useless. It is always true.
c1 = (close <= close(1))
You need to compare close from different candles.
@victormork, parentheses need to be replaced with brackets:
c1 = (close <= close[1])
if that is what rama meant.
Roberto