Strategy not working for certain symbols

Questions about MultiCharts and user contributed studies.
designer01
Posts: 80
Joined: 02 Feb 2010

Strategy not working for certain symbols

Postby designer01 » 19 Nov 2012

I have the standard Percent stop loss script (see code below) it works for most symbols but it sends the exit order in Symbol EURUSD at the entry price and not at the inputed percentage stoploss price. It works ok for other symbols like AUDUSD etc. Any ideas what may cause this?
Thanks

Code: Select all

inputs: StopLossPct( .05 ) ;

SetStopShare ;
if MarketPosition = 1 then
SetStopLoss( EntryPrice * StopLossPct )
else
Sell ( "PctStopLX-eb" ) next bar at Close * ( 1 - StopLossPct ) stop ;

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Strategy not working for certain symbols

Postby TJ » 19 Nov 2012

I have the standard Percent stop loss script (see code below) it works for most symbols but it sends the exit order in Symbol EURUSD at the entry price and not at the inputed percentage stoploss price. It works ok for other symbols like AUDUSD etc. Any ideas what may cause this?
Thanks

Code: Select all

inputs: StopLossPct( .05 ) ;

SetStopShare ;
if MarketPosition = 1 then
SetStopLoss( EntryPrice * StopLossPct )
else
Sell ( "PctStopLX-eb" ) next bar at Close * ( 1 - StopLossPct ) stop ;
this answer is not related to your calculation question...

see post #5
viewtopic.php?f=16&t=10811


ps. you don't need "MarketPosition=1" because SetStopLoss orders will only be sent if you have a position.


Return to “MultiCharts”