OmniTrader Professional Forum OmniTrader Professional 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 Professional Forum
Trade Plans In Strategies
Help on Trade Plan
Last Activity 12/16/2017 5:55 PM
80 replies, 18764 viewings

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

^ Top
Duxx

Elite
50010010010025
Posts: 825

Joined: 2/18/2009

User Profile
 
Subject : Help on Trade Plan
Posted : 2/25/2010 7:34 PM
Post #15519

Hi All

Im trying to develop a trade plan that will see to buy in a reversal - the picture attached show what I intend to do.

Enter a trade next day when the current bar crosses the high of previous bar.

Needs to be open 5 bars in the future to enter if not the order gets cancelled.

I tried to set up a stop limit trade - but for some reason it does not work - it gets reset to limit - and actually it buys at the open next day.

Attached is also the trade plan that i tried to set up

Thank you in advance for your guidance
Attached file : TradePlan.png (10KB - 460 downloads)
Attached file : 4x2-A.ott (92KB - 347 downloads)

^ Top
Jim Dean

Sage
20001000100
Posts: 3108

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/25/2010 10:03 PM
Post #15521 - In reply to #15519

Stop Limits currently have some problems. They don't permit Virtual Levels to be set ... there may be some other issues ... so ...

Try using a Stop Market with Units set for Points, Quantity set for 0, and Stop Offset set for Above High Prior Bar. Finally, set Periods in Force to 5.

I've not tested this but it should work.

^ Top
Duxx

Elite
50010010010025
Posts: 825

Joined: 2/18/2009

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/25/2010 10:12 PM
Post #15523 - In reply to #15521

Jim

Thank you

I tried what you mentioned and did not work - it does not take any trade.

Here is the trade plan


Attached file : 4x2-A.ott (92KB - 325 downloads)

^ Top
Jim Dean

Sage
20001000100
Posts: 3108

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/25/2010 11:01 PM
Post #15525 - In reply to #15523

How are you using it? In a strategy or manually?
^ Top
Duxx

Elite
50010010010025
Posts: 825

Joined: 2/18/2009

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/25/2010 11:03 PM
Post #15526 - In reply to #15525

Within a strategy - do you need a copy?
^ Top
Duxx

Elite
50010010010025
Posts: 825

Joined: 2/18/2009

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/25/2010 11:11 PM
Post #15527 - In reply to #15525

Jim - I just send you a copy via mail - many thanks
^ Top
Jim Dean

Sage
20001000100
Posts: 3108

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/25/2010 11:52 PM
Post #15528 - In reply to #15527

If you'd like to make sure that you only enter on a bar that has an OPEN price higher than the previous bar's High, then create a small #Stop in OLang:

#Stop
ExitLevel = High
if Open > High[1] then Signal=ExitSignal

You can use this with a Market order and it should work just fine. It should also work with a StopMarket or Limit order, set for a Virtual Level.

That Stop becomes a Condition for the Entry row.

[Edited by Jim Dean on 2/25/2010 11:54 PM]

^ Top
Duxx

Elite
50010010010025
Posts: 825

Joined: 2/18/2009

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/26/2010 7:36 AM
Post #15530 - In reply to #15528

Jim

Sorry for my lack of knowledge

in the little Olang below

when you have signal = exit signal is this for entry or exit.

Basically, I want that when the signal is generate by the strategy as follows:

1) Tonight I see a entry signal from the strategy (Day 0)
2) Tomorrow (day 1)enter trade if price is above high of Day 0
3) If not, do not enter but keep it open
4) Day 2 - price was not above high prior day
5) Day 3 - enter if current price is above prior Day (Day 2)

etc. same process until bar 5

Thanks
^ Top
Jim Dean

Sage
20001000100
Posts: 3108

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/26/2010 8:42 AM
Post #15537 - In reply to #15530

I am trying to finish up a BIG project today that I've been working on with Matt's help, to provide a THOROUGH "dictionary" / explanation for all kinds of things related to STOPS.

Please watch for the post, hopefully later today.

Quick answer ... don't fret about the word "exit". Think of it as a TRIGGER-condition, that activates the attached Order.

[Edited by Jim Dean on 2/26/2010 8:43 AM]

^ Top
Jim Dean

Sage
20001000100
Posts: 3108

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/26/2010 9:00 AM
Post #15539 - In reply to #15537

Thanks for the complete explanation ... that would have been helpful, if presented originally.

I can't spend more time on this right now ... sorry. Please fiddle with the OLang code ... your solution lies there.
^ Top
Jim Dean

Sage
20001000100
Posts: 3108

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/26/2010 12:21 PM
Post #15555 - In reply to #15539

Duxx ... I've discovered a piece of info (thanks Matt!) that clarifies the strange operation.

If you set up a "level" related to a L, SM, or SL order by using the dropdowns and the input fields on the right side of the pane, then that level does NOT update with each new bar.

That is, the level for the Limit Order is established on the FIRST bar ... based (in your case) on the H of the prior (Signal) bar ... and that level remains as-is for as long as that condition-row remains in force.

Furthermore, as I mentioned earlier, the Periods in Force is questionable at this time ... Matt is not sure that it is working properly.

So ... there are two viable solutions:

1. Just write the code in a OLang #Stop routine, and use a VIRTUAL level with your L or SM input, and that level has the ability to be set at whatever you want, based on bars that come before the bar the level is applied to. A lot more explan is coming with the big writeup.

2. You can also do it without using a #Stop routine. What you need is to set up a second Condition row in the first step, based on an Nbar Stop set to 1, then create another Step just like the first Step, and so forth, for five successive bars. See the attachment for the full picture.



[Edited by Jim Dean on 2/26/2010 12:24 PM]

Attached file : Duxx Entry.png (83KB - 1254 downloads)

^ Top
Duxx

Elite
50010010010025
Posts: 825

Joined: 2/18/2009

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/26/2010 1:38 PM
Post #15557 - In reply to #15519

Jim, excellent - very greatful

Right now, I got an invalid trade plan message - telling me that condition number (2) in step (1) is invalid because you cannot base the stop level on entry level as you are not entered at that point.

I eliminated the NBAR line from the step 1 and then it allowed me to save - not sure what is driving this - but will test it out.

Thank you

Attached file : Duxx1.png (27KB - 306 downloads)

^ Top
Jim Dean

Sage
20001000100
Posts: 3108

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/26/2010 1:54 PM
Post #15558 - In reply to #15557

Hi, Duxx:

Do NOT eliminate any lines ... that will "break" how the thing works.

Instead, just change the radio button on the bottom right for all the Nbar exits to "Previous Bar" H/L or Close ... that will elim the error message.
^ Top
Duxx

Elite
50010010010025
Posts: 825

Joined: 2/18/2009

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/26/2010 2:02 PM
Post #15561 - In reply to #15558

Ah - that worked and the trade plan was able to save - Ran the strategy again, but still not entering when it supposed to - this trade should have not been taken.
Attached file : Duxx1.png (27KB - 340 downloads)
Attached file : 4x2-B.ott (96KB - 281 downloads)

^ Top
Jim Dean

Sage
20001000100
Posts: 3108

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/26/2010 2:28 PM
Post #15565 - In reply to #15561

deleted by Jim

[Edited by Jim Dean on 2/26/2010 2:38 PM]

^ Top
Matthew Greenslet

Idol
2000252525
Posts: 2077

Joined: 2/27/2006

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/26/2010 2:28 PM
Post #15566 - In reply to #15519

Leave everything else the way it is but change the Limit order to a Stop Market order.

When buying shares a Limit = SomePrice or Lower. A Stop Market = SomePrice or Higher
^ Top
Jim Dean

Sage
20001000100
Posts: 3108

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/26/2010 2:35 PM
Post #15567 - In reply to #15566

Matt ... thank you. Egg on my face with this one 8~/

Duxx: I'm sorry I did not catch that earlier ... Matt hit it on the nose. Don't feel bad ... it's a mistake that's easy to make (obviously ... I made the same one ;~)

[Edited by Jim Dean on 2/26/2010 2:39 PM]

^ Top
Duxx

Elite
50010010010025
Posts: 825

Joined: 2/18/2009

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/26/2010 2:38 PM
Post #15568 - In reply to #15566

Matt

Thank you - changed to stop market

It kind of work for some but not for others... here is one example that did not worked.

See attached.
Attached file : Duxx3.png (21KB - 351 downloads)
Attached file : Duxx4.png (28KB - 327 downloads)

^ Top
Jim Dean

Sage
20001000100
Posts: 3108

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/26/2010 2:42 PM
Post #15569 - In reply to #15568

Duxx ... pls be sure your chart includes the YEAR ... which feb is your last attachment for?

Its a pain to search
^ Top
Duxx

Elite
50010010010025
Posts: 825

Joined: 2/18/2009

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/26/2010 2:44 PM
Post #15570 - In reply to #15568

Oh!

Duxx 4 - 2008
Duxx 3 - 2009

Thanks
^ Top
Matthew Greenslet

Idol
2000252525
Posts: 2077

Joined: 2/27/2006

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/26/2010 2:51 PM
Post #15572 - In reply to #15519

The yellow bars show when a step executes an order or changes steps.

So your Pending Signal bar (2 bars to the right of the first yellow line) completed, starting the tradeplan at the open of the New Signal bar (the bar directly after the Pending Signal). The high never hit the high of the prior bar and that bar completes. At the open of the next bar (first yellow line, I will refer to this as Step 1 bar) our NBar exit fires and submits a new Stop Market order for the high of the New Signal bar. Again the high does not cross our level and we repeat this process, drawing a yellow line on the Step 2 bar and entering a SM at the high of Step 1 bar.

Note the high of the Step 3 bar (third yellow line) is suspect to being >= the high[1]. I cant tell from the screen shot. However if assuming it is not we should have entered on Step 4 bar at a value = H[1]. and our stop levels become active on this bar. I am not sure what they are but they appear to have fired on the Step 4 bar (Entry Bar, indicated by the vertical line in the vote line, and the exit indicated by the blue X) after the market (daily chart) filling at the open of the Step 5 bar (last yellow line). The little blue box after the blue X (or stop code) indicates a delayed exit.

The second signal in the screen shot is correct. It never enters since High >= High[1] is never true. Really you should also see the dashed lines from the first signal drawn out over every bar that the order was in play and then just stop with the next bar blank. The reason being it is important to note those bars because a new signal can not be promoted to the vote line until that tradeplan completes. Just note this for now that if you see another new signal voted UNDER the vote line during 5 bars after your signal that is on the vote line and you are wondering why its not there, its because the tradeplan from the prior voted signal was active during that time.
^ Top
Matthew Greenslet

Idol
2000252525
Posts: 2077

Joined: 2/27/2006

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/26/2010 3:07 PM
Post #15573 - In reply to #15519

Duxx,

Best I can assume from your screen shots is that the order level is not changing from the first bar. Are you sure your NBar virtual conditions are configured correctly?
^ Top
Duxx

Elite
50010010010025
Posts: 825

Joined: 2/18/2009

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/26/2010 3:10 PM
Post #15574 - In reply to #15573

Matt

Here is the trade plan how was it structured




Attached file : tradeplan.png (29KB - 351 downloads)
Attached file : 4x2-B.ott (96KB - 291 downloads)

^ Top
Matthew Greenslet

Idol
2000252525
Posts: 2077

Joined: 2/27/2006

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/26/2010 3:21 PM
Post #15575 - In reply to #15519

I cant currently test due to the state of my testing box, but out of curiosity does the trade plan allow you to use a NBar periods of 0? If so please validate the entries.
^ Top
Duxx

Elite
50010010010025
Posts: 825

Joined: 2/18/2009

User Profile
 
Subject : RE: Help on Trade Plan
Posted : 2/26/2010 3:26 PM
Post #15576 - In reply to #15575

Matt

THe system allowed me to input 0 - but on the example Duxx 4 - the trade was not taken at all. It only shows the arrow up for the entry but that's it.

Attached is what I see now....

[Edited by Duxx on 2/26/2010 3:27 PM]

Attached file : Duxx5.png (18KB - 369 downloads)

Jump to page : 1 2 3 4
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.