Polynomial regression strategy

Strategies are published here.

Moderator: admin

Re: Polynomial regression strategy

Postby abhishekc05 » Thu Dec 24, 2015 3:48 am

Hi,

Am trying to learn Lua. Have a few doubts if you could help me out with this strategy:

Is it possible to set the alerts based on ticks [or a smaller time-frame] instead of candles like requested above in lua?
Also, when I back test any strategy, does the backtester also take into account transaction costs in the FXCM platform?


Any guidance would be very helpful.

Thanks,
Abhishek
abhishekc05
 
Posts: 4
Joined: Thu Dec 24, 2015 3:23 am

Re: Polynomial regression strategy

Postby Julia CJ » Tue Dec 29, 2015 2:52 am

Hi Abhishekc,

Is it possible to set the alerts based on ticks [or a smaller time-frame] instead of candles like requested above in lua?

Your code should contain a snip like this: 
ExtSubscribe(1, nil, instance.parameters.Period, instance.parameters.Type == "Bid", "bar");

The strategy will work with the specified periodicity. For ticks should contain the following code snip: ExtSubscribe(1, nil, "t1", instance.parameters.Type == "Bid", "tick").

Also, when I back test any strategy, does the backtester also take into account transaction costs in the FXCM platform?

Unfortunately, currently there is no such a function.
It is added to the development wish-list.
Julia CJ
 

Re: Polynomial regression strategy

Postby abhishekc05 » Wed Jun 22, 2016 4:30 pm

Thanks. I am trying to write a script for trading at tick data while the channels are being formed based on bar data ...Could you please have a look and advise if this looks ok? I am basically subscribing to both tick and bar data, forming the channels on bar data while the comparison for trade entry and exit is being done on tick data.

Thanks,Abhishek
Attachments
PolynomialRegression_Strategy2ACv1.lua
(14.29 KiB) Downloaded 511 times
abhishekc05
 
Posts: 4
Joined: Thu Dec 24, 2015 3:23 am

Re: Polynomial regression strategy

Postby abhishekc05 » Thu Jun 23, 2016 12:09 pm

Guys, I am very new to Lua ... this is not taking any trades FYI

Thanks,
Abhishek
abhishekc05
 
Posts: 4
Joined: Thu Dec 24, 2015 3:23 am

Re: Polynomial regression strategy

Postby Apprentice » Fri Jun 24, 2016 4:54 am

Capture.PNG

Set "Allow Strategy to trade" to Yes
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 26089
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Polynomial regression strategy

Postby abhishekc05 » Fri Jun 24, 2016 12:37 pm

I meant it is not showing any alerts - the version which I uploaded... If someone could help out - would be great!
abhishekc05
 
Posts: 4
Joined: Thu Dec 24, 2015 3:23 am

Re: Polynomial regression strategy

Postby FusterCluck » Fri Sep 30, 2016 8:06 am

easytrading wrote:kindly Apprentice,

PolynomialRegression_Strategy2.lua is not opening any positions even the sound alert is not. i set allow to trade to yes with all original settings. could you review and fix it please ?? with my appreciation in advance.



I'm having the same issue. Strategy is set to allow trading but no trades are being executed. Everything else seems to be in order.

easytrading, Any luck finding a solution?

Apprentice, do you have a potential cause/fix for this? Any advice where we might look?

I'm using FXCM Trading Station
FusterCluck
 
Posts: 1
Joined: Fri Sep 30, 2016 7:54 am

Re: Polynomial regression strategy

Postby jaricarr » Tue Oct 04, 2016 12:12 am

Hi Apprentice,

I'm getting the error below when optimizing both Polynomial Regression strategies.

Error occurred while backtest run. Description: attempt to index upvalue 'PR' (a nil value) 10/03/2016 23:17:24
Attachments
Polynomial Regression Strat error.JPG
Many thanks,
JariCarr
jaricarr
FXCodeBase: Initiate
 
Posts: 102
Joined: Fri Feb 19, 2016 12:39 pm

Re: Polynomial regression strategy

Postby Apprentice » Tue Oct 04, 2016 4:05 am

Please re-download.

For this strategy please installed polynomial regression indicator. (viewtopic.php?f=17&t=3715).
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 26089
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Polynomial regression strategy

Postby Apprentice » Sun Dec 18, 2016 5:18 am

Strategy was revised and updated.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 26089
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

PreviousNext

Return to Custom Strategies

Who is online

Users browsing this forum: Infime and 8 guests