Strategy

Questions about MultiCharts and user contributed studies.
guppy
Posts: 9
Joined: 20 Sep 2011
Has thanked: 1 time

Strategy

Postby guppy » 29 Sep 2011

I have a strategy that is executing correctly on backtesting but not live. I am using IQfeed as my data feed and OEC as my broker.

Basically i have a settargetproifit(500); which works out just find in backtesting but when going live it wont hold for the 500 dollar value and instead takes me out as 1 tick profit.

Please advise.

Thanks

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

Re: Strategy

Postby TJ » 29 Sep 2011

I have a strategy that is executing correctly on backtesting but not live. I am using IQfeed as my data feed and OEC as my broker.

Basically i have a settargetproifit(500); which works out just find in backtesting but when going live it wont hold for the 500 dollar value and instead takes me out as 1 tick profit.

Please advise.

Thanks
can't help you without knowing the following:

1. what is the instrument
2. what is the chart resolution
3. your code

guppy
Posts: 9
Joined: 20 Sep 2011
Has thanked: 1 time

Re: Strategy

Postby guppy » 30 Sep 2011

1.The instrument is the @EU# using IQfeed and 6EZ1 using OEC. I have both mapped. The IQfeed is the chart and has the 6EZ1 from OEC mapped to the chart as to send signals to OEC.

2.The chart resolution is a 1hr chart with 1000 bars back.

3.the code is below:

Code: Select all

vars: mystoploss(0);

if MarketPosition = 0 and close > close[1] then begin
mystoploss = Highest(high, 4)[0];
sellshort ("SSS") 1 contracts next bar at market;
end;

if MarketPosition = -1 then
buytocover ("XS2") next bar at mystoploss stop;
setprofittarget(500);


the setprofittarget does not seem to work once i map OEC as my broker, but works fine on iqfeed by itself.

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

Re: Strategy

Postby TJ » 30 Sep 2011

1.The instrument is the @EU# using IQfeed and 6EZ1 using OEC. I have both mapped. The IQfeed is the chart and has the 6EZ1 from OEC mapped to the chart as to send signals to OEC.

2.The chart resolution is a 1hr chart with 1000 bars back.

3.the code is below:

vars: mystoploss(0);

if MarketPosition = 0 and close > close[1] then begin
mystoploss = Highest(high, 4)[0];
sellshort ("SSS") 1 contracts next bar at market;
end;

if MarketPosition = -1 then
buytocover ("XS2") next bar at mystoploss stop;
setprofittarget(500);



the setprofittarget does not seem to work once i map OEC as my broker, but works fine on iqfeed by itself.

1. please use code tag when posting codes. It makes reading codes easier. I have tagged them for you in your post.

2. are you using intrabarordergeneration?

guppy
Posts: 9
Joined: 20 Sep 2011
Has thanked: 1 time

Re: Strategy

Postby guppy » 30 Sep 2011

No i am not using interbarordergeneration

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

Re: Strategy

Postby TJ » 30 Sep 2011

No i am not using interbarordergeneration
I have just tested the code. It works fine on the HSI 1 min chart.

Please check your big point value of the instrument.

If you still have problem,
Please post a screen shot of a test run.


attached see my test run.
Attachments
HSI test run.gif
(25.56 KiB) Downloaded 427 times

guppy
Posts: 9
Joined: 20 Sep 2011
Has thanked: 1 time

Re: Strategy

Postby guppy » 30 Sep 2011

Yes i know it works when you just apply it as is. But try mapping it, and then youll get the errors. Have your tried using iqfeed or esginal or a feed and then mapping the broker such as OEC or interactive brokers. Then apply the strategy and youll see it doesnt work. Please see attached.
Attachments
incorrect.JPG
(50.13 KiB) Downloaded 415 times

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

Re: Strategy

Postby TJ » 30 Sep 2011

Yes i know it works when you just apply it as is. But try mapping it, and then youll get the errors. Have your tried using iqfeed or esginal or a feed and then mapping the broker such as OEC or interactive brokers. Then apply the strategy and youll see it doesnt work. Please see attached.
Please check the big point value.

guppy
Posts: 9
Joined: 20 Sep 2011
Has thanked: 1 time

Re: Strategy

Postby guppy » 30 Sep 2011

bpv on oec is 1250
bpv on iqfeed is 125000

what am i supposed to do?

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

Re: Strategy

Postby TJ » 30 Sep 2011

bpv on oec is 1250
bpv on iqfeed is 125000

what am i supposed to do?
The bpv is given by the exchange for a specific instrument. These numbers should not be modified.

Having said that,
the numbers for the same instrument should be the same.

Please change the OEC bpv value to 125000 and see if it works.


Return to “MultiCharts”