logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
analias  
#1 Posted : Saturday, August 1, 2009 9:37:26 AM(UTC)
analias

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 5/22/2009(UTC)
Posts: 9

Hello Everyone,

I want to use a dynamic ATR based stoploss option in system tester, however system tester allows me only to use a percentage or points based static stoploss, so I have written the following code:

If(Simulation.CurrentPositionValue IS NOT NULL ?,Simulation.CurrentPositionValue=Simulation.CurrentPositionValue,Simulation.CurrentPositionValue=0);
IF(Close>=Simulation.CurrentPositionValue, ATR StopLoss Condition Comes Here, Normal Position (Buy or Sell) Condition Comes Here)

I need your help for the "IS NOT NULL?" part of the code, since there is no initial value for Simulation.CurrentPositionValue, the system is not entering any positions. I need to be able to identify if it is null or not. If it is null (for the start of the system) it should be equaled to zero for only once. After this initial kick, it will take the value of the last simulation.

Thanks very much for your help.
analias  
#2 Posted : Tuesday, August 4, 2009 12:42:49 AM(UTC)
analias

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 5/22/2009(UTC)
Posts: 9

analias wrote:
Hello Everyone,

I want to use a dynamic ATR based stoploss option in system tester, however system tester allows me only to use a percentage or points based static stoploss, so I have written the following code:

If(Simulation.CurrentPositionValue IS NOT NULL ?,Simulation.CurrentPositionValue=Simulation.CurrentPositionValue,Simulation.CurrentPositionValue=0);
IF(Close>=Simulation.CurrentPositionValue, ATR StopLoss Condition Comes Here, Normal Position (Buy or Sell) Condition Comes Here)

I need your help for the "IS NOT NULL?" part of the code, since there is no initial value for Simulation.CurrentPositionValue, the system is not entering any positions. I need to be able to identify if it is null or not. If it is null (for the start of the system) it should be equaled to zero for only once. After this initial kick, it will take the value of the last simulation.

Thanks very much for your help.


No answer yet, if there is any other way to use a dynamic ATR based stoploss in SYSTEM TESTER (not in Expert Advisor of course), please tell me that. I am stuck. Thank you.
fxci  
#3 Posted : Tuesday, August 4, 2009 8:19:29 AM(UTC)
fxci

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 8/4/2009(UTC)
Posts: 1

hi onvivo :D Do you know me [censored]ri ?
UserPostedImage
VOBiX  
#4 Posted : Wednesday, August 12, 2009 6:00:54 PM(UTC)
VOBiX

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 12/18/2008(UTC)
Posts: 7

fxci wrote:
hi onvivo :D  Do you know me [censored]ri ?
UserPostedImage
Hello fxci, I think I az çok know you. How is ANNA? Ben o kadar ms bilmiyom. O yüzden cevap yok unfortunately I am so üzgün 10vivo!
wabbit  
#5 Posted : Monday, August 17, 2009 11:32:49 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Try Richard Dale's Advanced Stops add-in. It has been written about many, many times on the forum. Do a search.


wabbit [:D]

Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.