I cannot get any kind of STOP to work with any strategy when back testing. The attached screenshots show a:
• Long only trade becoming a buy and hold; and
• Short only trade becoming sell and hold;
because stops did not execute.
Cannot for the life of me figure out why such is happening; any ideas and help would be gratefully appreciated. I have not bothered with back testing for nearly 4 years and feel totally lost.
I use MultiCharts64 Version 11.0 Release (Build 14734).
Thank you.
Khalid
CANNOT EXECUTE STOPS WHEN BACK TESTING
-
- Posts: 323
- Joined: 07 Jan 2007
- Location: Lahore, Pakistan
- Has thanked: 64 times
- Been thanked: 57 times
CANNOT EXECUTE STOPS WHEN BACK TESTING
- Attachments
-
- STOP Error_Long.jpg
- (235.46 KiB) Downloaded 596 times
-
- STOP Error_Short.jpg
- (234.37 KiB) Downloaded 596 times
- Anna MultiCharts
- Posts: 560
- Joined: 14 Jul 2017
- Has thanked: 42 times
- Been thanked: 141 times
Re: CANNOT EXECUTE STOPS WHEN BACK TESTING
Hello, khalaad!
The symbols from OANDA are coming with Big Point Value = 1. 1 in MultiCharts = 1 contract. But as far as OANDA symbols are traded in lots it’s advisable to change the Big Point Value according to the lot size on your account. For example, if the lot size on your account is 10000, please specify 10000 in the Big Point Value field.
Please, find how to change the Big Point Value here:
https://www.multicharts.com/trading-sof ... Properties
The symbols from OANDA are coming with Big Point Value = 1. 1 in MultiCharts = 1 contract. But as far as OANDA symbols are traded in lots it’s advisable to change the Big Point Value according to the lot size on your account. For example, if the lot size on your account is 10000, please specify 10000 in the Big Point Value field.
Please, find how to change the Big Point Value here:
https://www.multicharts.com/trading-sof ... Properties
-
- Posts: 323
- Joined: 07 Jan 2007
- Location: Lahore, Pakistan
- Has thanked: 64 times
- Been thanked: 57 times
Re: CANNOT EXECUTE STOPS WHEN BACK TESTING
Thank you, Anna, for posting a reply.
I am sorry I have not been able to make much of what you have said; perhaps the stop in question is _Percent Exit Pair which has no Big Point Value in the code.
Anyway, I have now sorted all stops issues, except for the percentage stops.
Khalid
I am sorry I have not been able to make much of what you have said; perhaps the stop in question is _Percent Exit Pair which has no Big Point Value in the code.
Code: Select all
inputs:
ProfitTargetPct( 0 ),
StopLossPct( .37 ) ;
SetStopShare ;
if MarketPosition <> 0 then
begin
if ProfitTargetPct > 0 then
SetProfitTarget( EntryPrice * ProfitTargetPct ) ;
if StopLossPct > 0 then
SetStopLoss( EntryPrice * StopLossPct ) ;
end
else
begin
if ProfitTargetPct > 0 then
SetProfitTarget( Close * ProfitTargetPct ) ;
if StopLossPct > 0 then
SetStopLoss( Close * StopLossPct ) ;
end ;
Khalid
- Anna MultiCharts
- Posts: 560
- Joined: 14 Jul 2017
- Has thanked: 42 times
- Been thanked: 141 times
Re: CANNOT EXECUTE STOPS WHEN BACK TESTING
Khalaad,
Big Point Value allows adjusting the Lot size and cannot be set from the code. Please, go to File -> New -> QuoteManager -> right-click on the symbol -> Edit Symbol -> Settings tab -> Big Point Value.
Big Point Value allows adjusting the Lot size and cannot be set from the code. Please, go to File -> New -> QuoteManager -> right-click on the symbol -> Edit Symbol -> Settings tab -> Big Point Value.
Re: CANNOT EXECUTE STOPS WHEN BACK TESTING
If I'm not mistaken, the unit for the parameter of "setstoploss" is currency, not points. EntryPrice and Close are in units of points. I think all you need to do is multiply by bigpointvalue (a reserved word), as in:
setstoploss( EntryPrice * StopLossPct * bigpointvalue )
Make sure your settings in Quote Manager are correct for that instrument's big point value, as the reserved word pulls the value from QM.
setstoploss( EntryPrice * StopLossPct * bigpointvalue )
Make sure your settings in Quote Manager are correct for that instrument's big point value, as the reserved word pulls the value from QM.