[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EquisMetaStock Group] Using System Tester w Dynamic Stoploss (HELP NEEDED: Simulation.Current...)



PureBytes Links

Trading Reference Links

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.



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/equismetastock/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:equismetastock-digest@xxxxxxxxxxxxxxx 
    mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/