Hi All
I am reaching out for some help on coding, I want to find a way of doubling down on my position when the trailing stop loss is greater than open.
I had a go at using pips, ie when market price is X pips above entry then open new position, but not had much luck getting this to work.
Ideally I want the Stop loss to drive the entry and possibly be able to add a further condition.
ie
When my TSL is greater than market entry price by X then open new market position.
Max positions 2
thanks for your help.
Tom
That’s an example:
DEFPARAM CumulateOrders = true
// .
// . this is where your code is (no matter how many lines it takes)
// .
IF PositionPerf > 0 THEN
BUY 1 CONTRACT AT MARKET //or SELLSHORT 1 CONTRACT AT MARKET
ENDIF
// .
// . you can write additional code here
// .
you may want to add some limit to the number of additional contracts to be traded (3 in this example):
IF (PositionPerf > 0) AND (abs(CountOfPosition) < 3) THEN