Adding minimum time between exit and new trade?

Questions about MultiCharts and user contributed studies.
jefferey
Posts: 9
Joined: 15 Jul 2010

Adding minimum time between exit and new trade?

Postby jefferey » 02 Aug 2010

I'm still very much a beginner just trying to learn Easycode.

I've been struggling to add code to allow a minimum time after my profit target is reached before I will enter a new trade, so that a new trade will not be entered into immediately after the target is reached.

Seems like it should be a very simple way to do this.

I've tried adding:
If BarsSinceExit >= 180 then

But it doesn't return any results. If I use BarsSinceExit >= 0 it works. Not really sure what I'm missing.

SUPER
Posts: 624
Joined: 03 Mar 2007
Has thanked: 99 times
Been thanked: 80 times

Re: Adding minimum time between exit and new trade?

Postby SUPER » 03 Aug 2010

try BarsSinceExit(1) >=180

(1) states one position back


***look at "Dictionary" within powerlanguage editor for definition and basic examples


Return to “MultiCharts”