currently i'm working on 3 same instruments with different data series (trade, bid and ask).
data1 as trade
data2 as ask
data3 as bid
i would like to use data1 trade series data as my trading signal generator, whatever signals generated from trade series data will initiate a buy/sell signals based on actual bid and ask data.
However, under strategy properties, i can only either select classic or extended data series.
if i selected classic, it doesnt reflect the actual bid and ask situation.
if i selected extended data series, it by default with calculate the strategy based on ask data series and the bid series of data. the signals generated are very different from trade series data.
appreciate if there is anyone can advise on this.
Thank you.
Signals based on Trade data series and buy and sell based on bid and ask data series
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Signals based on Trade data series and buy and sell based on bid and ask data series
If you this is a coding question, you need to post your codes.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Signals based on Trade data series and buy and sell based on bid and ask data series
Please check the following threats for ideas:
[FAQ] EasyLanguage / PowerLanguage
viewtopic.php?t=6929
[FAQ] Autotrade / Backtest / Optimization
viewtopic.php?t=10811
[FAQ] EasyLanguage / PowerLanguage
viewtopic.php?t=6929
[FAQ] Autotrade / Backtest / Optimization
viewtopic.php?t=10811
Re: Signals based on Trade data series and buy and sell based on bid and ask data series
Code: Select all
[IntrabarOrderGeneration = false]
inputs: Length( 5 ), NumATRs( .75 ) ;
Buy ( "VltClsLE" ) next bar at Close + AvgTrueRange( Length ) * NumATRs stop ;
Sell ( "VltClsLX" ) next bar at Close - AvgTrueRange( Length ) * NumATRs stop ;
these are my codes.
Generally, i want a precise backtesting result based on actual bid and ask data series. However, i'm exploring a way that these codes can calculate based on Trade series data.
this is because i'm trading in IBKR CFD, where spread is applied.
for example, this code applies to UK100 Index trade series data, initiated "buy" or "sell" signal based on trade series of data. this is not realistic if i'm trading CFD.
not sure how to address this correctly and clearly
the question is it possible that the "buy" or "sell" signals from Trade series of data to be generated exactly the same with bid and ask series of data?