| Coding Forum Collaborate, receive help, or discuss coding related issues. |
![]() | | Tweet | |
| | #1 | ||
![]() | Intrabar Exit, Easylanguage I have an strategy that works on 15 min bars. I need the strategy to exit 1 minutes before the session ends. I've already tried to run it on 1min bars but no combination of the parameters work as well as before and it's much slower. I've thought in different ways to get it. a) Open a 1 min chart on Data1 and another 15min chart on Data2 change the code in order to run the strategy on Data2 add a time exit on Data1 I've tried it but it doesn't run as expected, it's quite confusing b) On the same 15 min bars chart add the original strategy and add a new one with intrabarordergeneration=t rue is it the right way? Any advise? thanks | ||
| |
|
| | #2 | ||
![]() | Re: Intrabar Exit, Easylanguage 1. most brokers require the last order at least 3 minutes before session end to ensure a proper fill. 2. if something happens between you and the broker at the last minute (e.g. internet, computer hiccup, etc), you will have no alternative until the next session. 3...
__________________ Only an idiot would reply to a stupid post | ||
| |
|
| | #3 | ||
![]() | Re: Intrabar Exit, Easylanguage Code: var:
Last.Order.Time(1558);
If currenttime = Last.Order.Time then
begin
buytocover...
sell...
end; p.s. you will need intrabarordergeneration to execute anything intrabar.
__________________ Only an idiot would reply to a stupid post | ||
| |
|
| | #4 | ||
![]() | Re: Intrabar Exit, Easylanguage Quote:
Hello But how can I activate IntraBarOrderGeneration just for this part of the code and not for all the strategy ?? Do I need to add IntraBarOrderGeneration=T RUE in the functions too ? If I put 2 strategies on the same chart and one of them buys ... can I detect marketposition change from the other one? Or each strategy detects only its MP changes?? When working with intrabarordergeneration=T RUE... if I say Close[1] I mean the close of one bar ago. How do I get the value of 3 ticks ago? thanks Last edited by skan; 07-29-2010 at 12:33 PM. | ||
| |
|
| | #5 | ||
![]() | Re: Intrabar Exit, Easylanguage you can use SetExitOnClose. but you have to set your session time to X minutes before the actual close, because it is practically not possible to submit an order at the last tick.
__________________ Only an idiot would reply to a stupid post | ||
| |
|
| | #6 | ||
![]() | Re: Intrabar Exit, Easylanguage Quote:
Quote:
MarketPosition_at_Broker MarketPosition_at_Broker_ for_The_Strategy
__________________ Only an idiot would reply to a stupid post Last edited by Tams; 07-29-2010 at 12:40 PM. | ||
| |
|
![]() |
| Thread Tools | |
| Display Modes | Help Others By Rating This Thread |
| |
| ∧ Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to Exit Trades Based on Price Action? | keymoo | Trading and the Markets | 17 | 07-09-2011 12:14 AM |
| How to Do a Time Stop with Easylanguage | cunparis | Coding Forum | 11 | 07-13-2010 07:03 AM |
| NumericSeries and Arrays in Easylanguage | nsvv | Automated Trading | 10 | 07-13-2010 03:39 AM |
| EasyLanguage Going Object Oriented ! | Tams | Tools of the Trade | 24 | 07-03-2010 09:49 AM |
| Easylanguage at What Price | trader273 | Coding Forum | 1 | 05-22-2010 11:23 PM |