Jump to content

Recommended Posts

Posted

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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...