Topic: Bar Counting

Would there be a way to limit the life of a trade entry......

ie close out the trade after, say 10 bars, win or lose.....?

Has someone found a way to do that.?

Thanks

My 'secret' goal is to push EA Studio until I can net 3000 pips per day....

Re: Bar Counting

Unfortunately cannot do this in FSB/FST because the indicator does not know if a position has been opened. For now, I have heard it could be done in the Expert Advisor (which does have the position info). Unfortunately, that would not help you backtest it in FSB.

To add this kind of stop, it would have to be compiled into FSB for a future version. Best to put it on the Wish List to request it.

Re: Bar Counting

Using the trader is good enough..... I will have a look at that

Thanks for your reply


daveM

My 'secret' goal is to push EA Studio until I can net 3000 pips per day....

Re: Bar Counting

Hi DaveM,
Since Mr Popov has open sourced FSB, I was able to add this indicator onto the latest FSB beta.
This .exe has an exit indicator request for "Exit after N number of bars". Add "Bar Closing", then look for "N Bars Exit" indicator.
Posting the .exe (Forex Strategy Builder - NBarsExit.exe) attached. Copy to FSB install folder (ex: C:\Program Files\Forex Strategy Builder\ ) then double-click it directly to launch.
It is slow, you may have to wait 30-60 seconds for it to launch. You should see Task Manager showing CPU usage for the process.

Ex: n = 10: if your strategy enters at bar 1243, NBars will force the exit at the close of bar 1253.

You can use it with logical groups to be "and" as well as "or":
- use alone:  exit at close of N bars from opening of position
- use with another indicator: exit at N bars, or other indicator signal, whichever is first
- logical A with other indicator logical B: exit at N bars, or other indicator signal, whichever is first
- logical A with other indicator logical A: exit at N bars (or higher) and other indicator signal

The count starts from the entry of the position. It does not change if more lots are added to the position. It resets when the position is closed, or in the case of Close and Reverse.

Please advise if this works as expected, if it works well maybe we can ask Mr Popov nicely to allow it in the next version and add it to FSTrader.
thanks

Re: Bar Counting

Wow.....  a nice surprise...

Thanks so much.

My 'secret' goal is to push EA Studio until I can net 3000 pips per day....

Re: Bar Counting

Thank you Krog for developing this new function. It seams it works nice. For sure I'll include it in next FSB release.

Re: Bar Counting

I have been working with it for several hours with some interesting results.

Thanks so much.

My 'secret' goal is to push EA Studio until I can net 3000 pips per day....

Re: Bar Counting

You're welcome -- hope it helps you find some good strategies.

Re: Bar Counting

I am looking for a strategy that will do a lot of trades, hence I do not want to be in a trade for a long time, hence the idea of a time limit.

I am wondering if the Sharpe Ratio could be preset somehow so that only results with a certain Sharpe ratio  or better would be valid.

Because the Sharpe ratio is available in the Strategy Overview, I believe that it must be available somewhere in the program.

Certainly having it as a 'preset' would save a lot of time....

I know, I know.... enough is enough.!  lol

Thanks for your help.

My 'secret' goal is to push EA Studio until I can net 3000 pips per day....

Re: Bar Counting

BUG
N Bars Exit -- it available as a Close Slot, but it should not be. Please use only as CloseFilter (ie, use after first slot is "Bar Closing").
Thanks