Strategy to neutralize the positions before market close


Category:
0
0

hey Pete, 
Based on this simple script below
def exit = 1; 
I need your help to make this simple command work, 
in which from the time of 15:54 until 16:00 the exit will be equal to zero

 
I still have not found a way to translate this into Thinkscript language
This way, the strategy will neutralize the positions on the day, to avoid the situation of holding positions overnight

I really appreciate your support.

RESOLVED
Marked as spam
Posted by (Questions: 7, Answers: 13)
Asked on April 12, 2017 8:16 am
296 views
0

I think we’re missing some code? You reference a statement, def exit = 1; but I did not find any code in your post. Also, I think I’m going to need to see a screenshot to understand what you are trying to describe.

( at April 12, 2017 11:35 am)
0

actually, I managed to solve this one
Here’s a script that should plot zero from 1554 to 1600:
def start = 1554;
def end = 1600;
plot data = if secondsFromTime(start) > 0 and secondsFromTime(end) < 0 then 0 else 1 ; Have a good day.

( at April 12, 2017 12:58 pm)