Hi molanisfx,
Thanks for the reply.
Are you referring to this post: Re:One trade per day? on Thu Aug 2, 2012 by RJo which says in part:
Quote:
Personally, I haven't had a use for this because I tend to limit my orders by open position count. Basically, I haven't learned the whole time thing. I don't care if I get 1 or 10 orders per day, as long as each is entered at its own set of conditions. For this you can use the special Molanis code,
&& CalculateOpenPositions (Symbol(), OPEN_BUY, MagicNumber==MagicNumberLong)=<0
In effect, this says AND CURRENT OPEN BUY POSITIONS MUST BE ZERO as an additional trade condition.
and for sells:
&& CalculateOpenPositions (Symbol(), OPEN_SELL, MagicNumber==MagicNumberShort)=<0
Don't forget to adjust parentheses to enclose conditions as needed.
If this is not the code you were referring to please post a link to the thread or post.
Thanks