1st position
- Code: Select all
DistanceB=(source.close[ period]-source.open[ period])/source:pipSize();
If DistanceB > 50 pips then
open LONG with
STOP and LIMIT 300 pips.
Position1=source.close[ period]
2nd position
- Code: Select all
While there is open a LONG position,
do not allow to open any SHORT positions,
but allow to open LONG,
ONLY IF
source.close[ period] > Position1
and DistanceB > 50 pips
Position2=source.close[ period]
STOP AND LIMIT should be at the same price as the 1st position
3d position
- Code: Select all
should open another LONG when parameters meet.
If source.close[ period] >Position2
and DistanceB > 50 pips
STOP AND LIMIT should be at the same price as the 1st position
And it continues to open LONG positions until limit reached and all opened LONG positions close.
The same apply for Short positions