Discussions
»
Product and Service Development
»
Formula Assistance
»
Using System Tester w Dynamic Stoploss (HELP NEEDED: Simulation.CurrentPositionValue)
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.
|
|
|
|
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.
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 8/4/2009(UTC) Posts: 1
|
hi onvivo :D Do you know me [censored]ri ?
|
|
|
|
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 ?
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!
|
|
|
|
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)
|
Discussions
»
Product and Service Development
»
Formula Assistance
»
Using System Tester w Dynamic Stoploss (HELP NEEDED: Simulation.CurrentPositionValue)
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.