Daily OHLC: enterLong on Open / exitLong on Close

Posted By: dh85

Daily OHLC: enterLong on Open / exitLong on Close - 09/20/19 04:50

I have daily OHLC t6 data and want to enterLong on the daily bar Open price and exit on the same daily bar Close price.

Zorro always uses the Close price when calling enterLong and I don't know how to make it use the Open price instead.

Many thanks in advance.
Posted By: jcl

Re: Daily OHLC: enterLong on Open / exitLong on Close - 09/20/19 10:09

Set Fill=1, exit the previous trade, then set Fill=2 and enter the next trade.

https://manual.zorro-project.com/fill.htm
Posted By: dh85

Re: Daily OHLC: enterLong on Open / exitLong on Close - 09/21/19 03:36

Thanks so much jcl!

This is doing exactly what I wanted (Fill = 3 instead of 2):

Fill = 1;
exitLong();
Fill = 3;
enterLong();
© 2024 lite-C Forums