ExitSignal
Author: Calarnic
Creation Date: 1/22/2009 7:17 AM
profile picture

Calarnic

#1
Greetings!

I'm the beginner in C# and I've already experienced some problems.

I have constructed a simple script which exit the positions on: Stop loss, MFEAsOfBarPercent and Close < SMA (14)

I'd like to enter a long position after a Close is greater than SMA(14) or to reenter a position if an exit order had a Signal name "Level1".

Unfortunately, after an ExitSignal name "Level1" the reenter algorithm opens a new position on each bar. How to avoid that?

Thanks in advance

CODE:
Please log in to see this code.

profile picture

Eugene

#2
Calarnic, or may we call you Trefl, or even Galadriel? It comes out that Calarnic's 30-day free trial has been taken in November, are you still using it? ;)
profile picture

Calarnic

#3
What do you mean Eugene?
profile picture

Calarnic

#4
Guys, I've found the solution.
The problem was in "text" variable. After each Buy condition I must reset it.
Here it is
CODE:
Please log in to see this code.


Best regards. Hope this would be helpful for newbie