Hi
I hope I am posting this in the correct forum – see ahead
I am a bit confused how trailing stops work. I want to open a position manually then invoke/start a trailing stop (Parabolic SAR, standard settings). I am familiar with scripts in Metatrader where one would start the desired one after opening a position.
I found some code on the forum but this is a trading system which automatically initiates and closes trades. (see below)
Where I get confused is is it possible to open a trade manually and trade it automatically – is this done via an indicator or trading system (or something else?) Any pointers would be greatly appreciated.
An associated question: Is the stop triggered when the value is reached, or only at the close of the bar? Is there a way to specify for either condition?
/——————————————————
/sorry -no idea how to use BBCodes ………………….
REM INDICATOR
mySAR = SAR[0.02,0.02,0.2]
REM CONDITIONS
c1 = mySAR >= High
c2 = mySAR <= Low
IF Not OnMarket THEN
IF c1 THEN
BUY 1 CONTRACT AT mySAR STOP
ENDIF
IF c2 THEN
SELLSHORT 1 CONTRACT AT mySAR STOP
ENDIF
ENDIF
IF LongOnMarket THEN
mySTOP= mySAR
IF Close >= TradePrice(1) THEN
mySTOP = mySAR
SELL AT mySTOP STOP
ELSE
SELL AT mySTOP STOP
ENDIF
ENDIF
IF ShortOnMarket THEN
mySTOP= mySAR
IF Close <= TradePrice(1) THEN
mySTOP = mySAR
EXITSHORT AT mySTOP STOP
ELSE
EXITSHORT AT mySTOP STOP
ENDIF
ENDIF
Stops are triggered once the price is reached if you are dealing with pending STOP (or LIMIT) orders, since they are in your broker orders book.
About your query, I’m sorry but it is not possible to deal with manual orders with ProOrder. A lot of people would be interested in this feature for sure .. You can ask directly prorealtime with their suggestion box: https://www.prorealtime.com/en/contact?suggestion=1
Thanks for the information Nicolas. I will certainly follow-up on your suggestion.
Allowing an automated strategy to automatically manage exits of manually opened trades is way overdue imho.