Jump to content

[Problem] About SetDollarTrailing in TS 9


lonelong

Recommended Posts

Dear all,

 

I have a code as below:

if date = 01022001 and time = 1315 then

buy 1 contracts next bar at 4907 or higher;

 

SetDollarTrailing(1);

 

The source data list as below:

date, time, open, high, low, close, vol, int

01022001,1315,4880,4898,4880,4880,208,0

01022001,1320,4880,4919,4880,4919,238,0

 

There is a long position at time 1320, the entry price is 4907, but the trailing stop is 4906 at same time.

According to the simulating strategy, it will go open -> low -> high -> close.

Then, at time 1320, it will be 4880 -> 4880 -> 4919 -> 4919, when the long position is created, the price 4906 has no chance to occur.

 

Anyone knows how calculate the stop price 4906?

Thanks for your help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...