OmniTrader Forum OmniTrader Forum
forums calendars search
today this week
 
register logon control panel Forum Rules
You are currently browsing as a guest.
You should logon to access more features
A Self-Moderated Community - ALL MEMBERS, PLEASE READ!
Vote for Members who contribute the most to your trading, and help us moderate content within the Forums.


  Current location        Thread information  
OmniTrader 2017 Upgrade Forums
Plug-ins for OmniTrader
Squeeze Trader - Trade session Boundary
Last Activity 12/24/2017 1:50 AM
13 replies, 1476 viewings

Jump to page : 1
Now viewing page 1 [25 messages per page]
 
back reply
Printer friendly version

^ Top
John J

Veteran
100100
Posts: 218

Joined: 8/3/2010
Location: Leduc, AB

User Profile
 
Subject : Squeeze Trader - Trade session Boundary
Posted : 5/8/2017 3:08 PM
Post #41017

Hi Barry,

The Trade Session Boundary Stop in the RT strats don't seem to close out any trades 15 minutes before the session closes. Is this governed by eastern time zone? My computer is running in Mountain time...
^ Top
Barry Cohen

Sage
50001001001002525
Posts: 5352

Joined: 1/19/2004

User Profile
 
Subject : RE: Squeeze Trader - Trade session Boundary
Posted : 5/8/2017 3:15 PM
Post #41018 - In reply to #41017

It goes by your system's time. It may be that that stop is dependent on the timeframe periodicity. So for example if you set it to 15 minutes before the close, but you're using daily charts, I don't think it will exit. However if you're using 5 minute charts it would. I think that's the behavior, but I'm not 100%.
^ Top
John J

Veteran
100100
Posts: 218

Joined: 8/3/2010
Location: Leduc, AB

User Profile
 
Subject : RE: Squeeze Trader - Trade session Boundary
Posted : 5/8/2017 3:52 PM
Post #41020 - In reply to #41017

Hi Barry,

I was using a 5 minute HA chart (I have not tested for this behavior in a regular 5 minute chart yet). However, if it goes by system's time, we should somehow be able to offset the time zone?
^ Top
Barry Cohen

Sage
50001001001002525
Posts: 5352

Joined: 1/19/2004

User Profile
 
Subject : RE: Squeeze Trader - Trade session Boundary
Posted : 5/8/2017 3:55 PM
Post #41021 - In reply to #41020

5 minute HA timeframe should work. It's possible it's a bug with that stop mixed with HA. I'll check it out.
^ Top
John J

Veteran
100100
Posts: 218

Joined: 8/3/2010
Location: Leduc, AB

User Profile
 
Subject : RE: Squeeze Trader - Trade session Boundary
Posted : 11/6/2017 5:02 PM
Post #42608 - In reply to #41017

Hi Barry,

Just checked, and I can confirm that the bug is still present in the HA timeframe.
^ Top
John J

Veteran
100100
Posts: 218

Joined: 8/3/2010
Location: Leduc, AB

User Profile
 
Subject : RE: Squeeze Trader - Trade session Boundary
Posted : 11/8/2017 11:08 AM
Post #42616 - In reply to #41017

Hi Barry,

It's important that we get this issue resolved. Right now, it's impossible to start a new trading session on a "clean slate" with any HA based intraday strategy.

When the Trade Session Boundary Stop fails to close all trades from the previous trading session, some trades will remain open on the Voteline in the current trading session. As we all know, AutoTrade entries are governed by the Voteline.

I realize that the problem may stem from the inherent delay in forming HA bars. However, I don't mind if it's instructed to exit the trade at let's say 15:50, but the actual exit takes place at 15:55 (in a 5M timeframe).

[Edited by John J on 11/8/2017 11:16 AM]

^ Top
Jim Dean

Idol
20005001001002525
Posts: 2771

Joined: 9/21/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Squeeze Trader - Trade session Boundary
Posted : 11/8/2017 11:13 AM
Post #42617 - In reply to #42616

Here is a shot in the dark about a temporary workaround:

Using RT, define your dataperiod bar lengths to be, say, 384 minutes if your desired exit time is 5 min before close.

In theory, the "nearly a full day" HA bar will be complete just before the 3:55pm moment hits.
^ Top
Jim Dean

Idol
20005001001002525
Posts: 2771

Joined: 9/21/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Squeeze Trader - Trade session Boundary
Posted : 11/8/2017 11:15 AM
Post #42618 - In reply to #42617

also, put a FB limit on entries so they can't be after 3:50pm ... otherwise it might try to trade the teensy HA bar that follows the exit
^ Top
John J

Veteran
100100
Posts: 218

Joined: 8/3/2010
Location: Leduc, AB

User Profile
 
Subject : RE: Squeeze Trader - Trade session Boundary
Posted : 11/8/2017 11:40 AM
Post #42619 - In reply to #41017

Thanks Jim,

Regarding suggestion #1 I think I'll wait for a bug fix, which needs to work on all timeframes.

As for suggestion #2, I didn't think of that, so I will be adding it to the filter.

[Edited by John J on 11/8/2017 11:41 AM]

^ Top
Jim Dean

Idol
20005001001002525
Posts: 2771

Joined: 9/21/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Squeeze Trader - Trade session Boundary
Posted : 11/8/2017 12:22 PM
Post #42620 - In reply to #42619

suggestion #2 only matters if the HA "daily" bar is defined to be < 390 minutes ... so you need to do both or neither

it might take N a long time to get to this ... I'd suggest just giving the suggestions a *try* ... if in fact it's really important to you

the idea will work for any timeframe ... for example, if you are using hourly bars, define the HA bar as 58 minutes and the execution to be done 1 min before closing, with FB rule blocking out the final few minutes of each bar.

[Edited by Jim Dean on 11/8/2017 12:23 PM]

^ Top
John J

Veteran
100100
Posts: 218

Joined: 8/3/2010
Location: Leduc, AB

User Profile
 
Subject : RE: Squeeze Trader - Trade session Boundary
Posted : 11/8/2017 12:53 PM
Post #42621 - In reply to #41017

Thanks for your input Jim,

Ok, In case it will take long to rectify it, I may decide to go along with your suggestion.

Something that N perhaps should consider, would be to add an option to RT (intraday) profiles that will, when enabled, close out all open trades in one swoop prior to the close of the trading session. I'm sure daytraders would welcome something like this (they are subject to overnight margins on all trades left open from one trading session to the next)...
^ Top
John J

Veteran
100100
Posts: 218

Joined: 8/3/2010
Location: Leduc, AB

User Profile
 
Subject : RE: Squeeze Trader - Trade session Boundary
Posted : 11/13/2017 1:00 PM
Post #42623 - In reply to #41017

The easiest way to go about it is to utilize the Olang variable BeforeSessionClose.

In a 5M timeframe, it seems like the condition needs to be activated 10 minutes before the close, even though a Market order is being used. A Market order should exit on the current bar as opposed to the next bar (it exhibits the same behavior in both HA and regular timeframes).

#Stop

#PARAM "MinB4Close", 10

If Signal = LongSignal Then
If BeforeSessionClose(0, MinB4Close) = False Then
Signal = ExitSignal
End If
ElseIf Signal = ShortSignal Then
If BeforeSessionClose(0, MinB4Close) = False Then
Signal = ExitSignal
End If
End If

^ Top
Jim Dean

Idol
20005001001002525
Posts: 2771

Joined: 9/21/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Squeeze Trader - Trade session Boundary
Posted : 11/13/2017 1:31 PM
Post #42624 - In reply to #42623

That should work. Here is an equivalent solution, that's simpler:

#Stop
#PARAM "MinB4Close", 10
If BeforeSessionClose(0, MinB4Close) = False Then Signal=ExitSignal

In fact, that's simple enough that you don't need to define a stop in OLang (or own OTpro) ... you can do it with an OmniScript forumla:

not(BeforeSessionClose(0, 5))
... and just change the "5" to whatever is appropriate for your timeframe

^ Top
John J

Veteran
100100
Posts: 218

Joined: 8/3/2010
Location: Leduc, AB

User Profile
 
Subject : RE: Squeeze Trader - Trade session Boundary
Posted : 11/13/2017 2:55 PM
Post #42625 - In reply to #41017

Thanks Jim,

Yes, that's definitively a more elegant method.

When I first tested it, I noticed that I had to set the parameter to 15 minutes instead (in order for all trades to exit at 3:55pm that is). So I reverted back to the previous Stop condition to see if it happened to behave the same way, which it did. This is odd since I had it working with the parameter set to 10 minutes earlier in the day...
Jump to page : 1
Now viewing page 1 [25 messages per page]
back reply

Legend    Action      Notification  
Administrator
Forum Moderator
Registered User
Unregistered User
E-Mail this thread to a friend
Toggle e-mail notification


Nirvana Systems
For any problems or issues please contact our Webmaster at webmaster@nirvsys.com.