Login Page - Create Account

Support Board


Date/Time: Fri, 10 May 2024 11:35:32 +0000



[Programming Help] - regarding back testing

View Count: 772

[2019-05-08 09:05:23]
User479048 - Posts: 19
can we run script to do perform multiple backtesting on sierra?
[2019-05-09 03:57:37]
Sierra Chart Engineering - Posts: 104368
No, but there is this command which can perform a back test for multiple symbols in a single step:
Trade Menu: AutoTrade System Bar Based Backtest with Scan (Trade menu)
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2019-05-09 06:40:31]
User479048 - Posts: 19
regarding Post: #2.

when i try to do auto backtest with scan i get the error saying order entry skipped because recalculation.
i have attached the screenshot please help for the same.

i openend eur.usd 1 min chart and added in watch list gbp.usd and enabled watch mode.
Date Time Of Last Edit: 2019-05-10 02:29:10
imageBAckTest_2ndsymbol.png / V - Attached On 2019-05-09 06:39:19 UTC - Size: 132.55 KB - 247 views
[2019-05-10 02:30:20]
Sierra Chart Engineering - Posts: 104368
Well certainly that is going to occur during the initial full recalculation.

In your study function, return if sc.IsFullRecalculation is true. This will avoid the error and the back test will continue normally after.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2019-05-20 10:05:32]
User479048 - Posts: 19
In my strategy , we fire entry or exit for each bar ,based on entry and exit conditions

We check current position (0/1) by sc.GetTradePosition() function as below code:

Quantity =0,position =0
int PositionDataResult = sc.GetTradePosition(PositionData);

if (PositionDataResult > 0)
{
  Quantity = PositionData.PositionQuantity;//Access the quantity

  if (Quantity > 0)
  {
    position = Quantity;
  }  
}

if position and quantity both are 0 then we fire entry order and if they are > 0 we fire exit order.
i.e. it goes like, BUY then SELL then BUY then SELL....

While doing backtesting by adding multiple symbols in watch list :
for few symbols(for eg: DGLD 60min chart) it goes like, BUY then BUY then BUY

while if we perform backtest on that particular symbol(DGLD 60min chart) alone
it goes fine i.e. BUY then SELL then BUY then SELL....

Dont knjow why at times it goes like BUY BUY BUY or SELL SELL SELL.
it should be always BUY SELL BUY SELL

i have attached the screenshots for the same
imagebuybuybuy.png / V - Attached On 2019-05-20 10:03:45 UTC - Size: 177.32 KB - 259 views
imagebuysellbuysell.png / V - Attached On 2019-05-20 10:03:54 UTC - Size: 116.87 KB - 244 views
imagesellsellsell.png / V - Attached On 2019-05-20 10:04:59 UTC - Size: 101.46 KB - 257 views

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account