forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Software

Create and Test Forex Strategies

You are not logged in. Please login or register.


Forex Software → Technical Indicators → Exit Interval indicator

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 19

1 (edited by Popov 2013-07-31 13:28:07)

Topic: Exit Interval indicator

Request: indicator to close at a specified interval, like every 15 minutes, or every hour.

Indicator: Exit Interval

How to Use: in Closing slots, add Bar Closing. Then, add Exit Interval.

Parameters:
Interval Period -- set to every 5 minutes, 15 minutes, 30 minutes, 1 hour, or 4 hours
-- it will change the options so it's always higher than your current time frame

Offset -- move the interval forward this number of bars

Since it's Bar Closing, by default, it sends the close signal at the end of the bar before your target periodicity. This way, the signal comes fairly close to the target time, not after market closes.

Ex: 15 minutes current time frame, Interval Period = 1 hour
Expected: It will send the close signal on the bar at 1:45, 2:45, 3:45  (not 2:00, 3:00, 4:00). This is so that the order will be sent very close to the target time. In the example, the end of bar 1:45 would be 1:59:59.
If you really want it on the 2:00 bar, then set offset to 1.

If you want a 4-hour interval like 1:00, 5:00, 9:00:
- figure out how many bars offset your desired time
(ex: want to adjust by 1 hour, which has 12 bars with current time frame = 5)
- enter in Offset parameter

I think this should work as the requested indicator; feel free to ask or comment if to help make it more useful. I've done a little testing, if there are any crashes or unexpected behavior please advise. This is the first version, so there may be some bugs. Thanks


Repository link: Exit Interval

Re: Exit Interval indicator

Thanks, great work!

Re: Exit Interval indicator

Hey Krog, thanks SO MUCH for building this, I'm super excited to test it out. I got this error in FSB (running 2.67.1.0 beta) when it started.

Post's attachments

exit-interval-error.png
exit-interval-error.png 4.27 kb, 1 downloads since 2012-02-23 

You don't have the permssions to download the attachments of this post.

Re: Exit Interval indicator

dusktrader wrote:

Hey Krog, thanks SO MUCH for building this, I'm super excited to test it out. I got this error in FSB (running 2.67.1.0 beta) when it started.

Hi dusktrader,
thanks for pointing that out, it is a bug, I knew there was going to be something. As it is now, it's only for time frames less than 4 hours; if you have daily data, you will get this error. I'll try to sort this out then post a fix. In the meantime, should work with 1 min to 1 hour data.
thanks

Re: Exit Interval indicator

Hey Krog, thanks for looking into this. FYI I only work with the M1 timeframe. The error pops up before FSB finishes initializing.

Re: Exit Interval indicator

Ok, I hope this version works better. In this version, if you choose an interval lower than your Time Frame, it does nothing and returns out. It will look like it never exits. I'm pretty sure this will solve dusktrader's bug.

Also, added more options for interval -- 10 minutes, 2 hours, 3 hours, 8 hours, 12 hours.

Post's attachments

Exit Interval.cs 6.12 kb, 45 downloads since 2012-02-23 

You don't have the permssions to download the attachments of this post.

Re: Exit Interval indicator

Good morning, I've tried out your new version and it does load into FSB with no problems now. But I'm not sure that it is working correctly.  Testing on M1 timeframe, I set the interval to 15 minutes. Look at this trade log and you can see that it is not closing the positions every 15 minutes. The closes at 20:59 are caused by the fact that Generator has also added Week Closing in this particular strategy.

During the Generator run, I do lock the Exit Interval condition, so it should still force a close every 15 minutes, right?

Post's attachments

exit-interval.png
exit-interval.png 4.78 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Exit Interval indicator

dusktrader wrote:

Good morning, I've tried out your new version and it does load into FSB with no problems now. But I'm not sure that it is working correctly.  Testing on M1 timeframe, I set the interval to 15 minutes. Look at this trade log and you can see that it is not closing the positions every 15 minutes. The closes at 20:59 are caused by the fact that Generator has also added Week Closing in this particular strategy.

During the Generator run, I do lock the Exit Interval condition, so it should still force a close every 15 minutes, right?

First thing I can think of, you may have Exit Interval and Week Closing in the same logical group. I think they have to be in different logical groups to get the "OR"; if they are in the same logical group, it's "AND" so both Exit Interval and Week Closing would have to signal.

Re: Exit Interval indicator

Well I tried to set the logical groups but apparently Week Closing doesn't have an option for that. In any case, I went in and banned the few closing conditions that might cause this issue, and now it seems that your indicator is doing what I wanted (so I think you were right about your description)... so far nothing profitable but I can verify that it is forcing closes like it should. Thanks!

10 (edited by Luchetto93 2012-02-28 15:33:24)

Re: Exit Interval indicator

hey krog,
thanks a lot for the work on the indicator.. smile
It will be really useful for my binary options studies!

Re: Exit Interval indicator

Ok a question guys, sorry but i'm a newbie of FSB:

let's say i would like to work on 5 min TF and setup my end of the trade every 15 minutes, to simulate the expiry of my binary options trade.

How should i set my FSB?

Thanks

Re: Exit Interval indicator

In Closing:
- add "Bar Closing" indicator
- add "Exit Interval" indicator
- set time interval parameter to "15 minutes"
- open chart, check that Exit Interval has exit signal on correct bar
- use "Offset parameter" to move the exit bar if it is not correct

For 5 minute, that should give an exit signal every 3 bars.

I hope that works for your study, let me know if it has any bugs or does something unexpected

Re: Exit Interval indicator

i've done the first 3 step, but don't know what do you mean in the 4:

when i open the chart once done the 3, i see this:
http://img85.imageshack.us/img85/4075/fsbm.jpg


What should i do?


thanks krog

Re: Exit Interval indicator

ok solved! Thanks

Re: Exit Interval indicator

Luchetto93 wrote:

ok solved! Thanks

Sorry, I was away for a while, but sounds like you got it -- add some open entry indicators so it enters some trades.

Re: Exit Interval indicator

Yeah i'm gonna work on settings, coz found a few good strategies but are not good for BO's, they ADD and CLOSE position, while this settings are disable it doesnt find many strategies and the one that find are with less trades, like 15 - 20 during 2 months !

Keep you updated!

Re: Exit Interval indicator

when i run this indicator via FSB 3.0, i get this message

Custom Indicators
File name: Exit Interval.cs
ERROR: Obsolete format of source code in file [Exit Interval.cs].
Get a newer version from Code Repository.

Where can I find "Exit Interval.cs" for FSB 3.0?

Re: Exit Interval indicator

I converted it in the new format: Exit Interval

Re: Exit Interval indicator

thanks a lot!

Posts: 19

Pages 1

You must login or register to post a reply

Forex Software → Technical Indicators → Exit Interval indicator

Similar topics in this forum