Two Time Frame SSL

Strategies are published here.

Moderator: admin

Two Time Frame SSL

Postby Apprentice » Fri Dec 07, 2018 7:16 am



Based on SSL.lua
Two Time Frame SSL.lua
(31.36 KiB) Downloaded 15 times
User avatar
FXCodeBase: Confirmed User
Posts: 20089
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Two Time Frame SSL

Postby Daveatt » Sun Dec 09, 2018 6:53 am

Thanks Apprentice
It seems to work well

I have a last question regarding this topic
I was trying to copy what you did in the Sample-strategy_3.lua file. This is a sample strategy using the new code framework you created (using modules like trading_logic, DailyLimitProfit, etc)

I need a version that works with this new framework because I developed a lot of code for a strategy using it - and coming back to the old framework won't be ideal

So I updated the functions trading_logic:Prepare and trading_logic:Ext_update to create the trading_logic.Source_SSL object
Seems only the first few candles are loaded with the T1_SSL object though and for the life of mine, I can't figure out what's wrong here
The code is extremly simple, and I used ExtSubscribe as I always do

Code: Select all
if instance.parameters.T1_Check_SSL then
      T1_TF_SSL = instance.parameters.T1_TF_SSL;
      self._trading_source_SSL_id = self._ids_start + 4;
      self.Source_SSL = ExtSubscribe(self._trading_source_SSL_id, nil, instance.parameters.T1_TF_SSL, instance.parameters.is_bid, "bar");

I looked for a few days and didn't find why the code A) is not working and B) doesn't take any trade in the backtest

I would really appreciate from an educational perspective, to learn where I'm wrong here

Thanks so much
(109.64 KiB) Downloaded 2 times
Posts: 35
Joined: Mon Jan 30, 2017 10:00 am

Return to Custom Strategies

Who is online

Users browsing this forum: No registered users and 9 guests