Page 3 of 4

Re: Polynomial regression strategy

PostPosted: Thu Dec 24, 2015 3:48 am
by abhishekc05
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

Re: Polynomial regression strategy

PostPosted: Tue Dec 29, 2015 2:52 am
by Julia CJ
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.

Re: Polynomial regression strategy

PostPosted: Wed Jun 22, 2016 4:30 pm
by abhishekc05
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

Re: Polynomial regression strategy

PostPosted: Thu Jun 23, 2016 12:09 pm
by abhishekc05
Guys, I am very new to Lua ... this is not taking any trades FYI

Thanks,
Abhishek

Re: Polynomial regression strategy

PostPosted: Fri Jun 24, 2016 4:54 am
by Apprentice
Capture.PNG

Set "Allow Strategy to trade" to Yes

Re: Polynomial regression strategy

PostPosted: Fri Jun 24, 2016 12:37 pm
by abhishekc05
I meant it is not showing any alerts - the version which I uploaded... If someone could help out - would be great!

Re: Polynomial regression strategy

PostPosted: Fri Sep 30, 2016 8:06 am
by FusterCluck
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

Re: Polynomial regression strategy

PostPosted: Tue Oct 04, 2016 12:12 am
by jaricarr
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

Re: Polynomial regression strategy

PostPosted: Tue Oct 04, 2016 4:05 am
by Apprentice
Please re-download.

For this strategy please installed polynomial regression indicator. (viewtopic.php?f=17&t=3715).

Re: Polynomial regression strategy

PostPosted: Sun Dec 18, 2016 5:18 am
by Apprentice
Strategy was revised and updated.