can a strategy working on both tick and candle level?

Moderator: admin

can a strategy working on both tick and candle level?

Postby csshine » Mon Jan 07, 2019 11:17 pm

Hi, Dear
As I know, If I do not import helper.lua, the strategy is working on tick level. If import helper.lua, the strategy is working on candle level.
But I want a strategy check open order on tick level and close order on candle level. Is it possible the implement this idea?
Thank you for help!
csshine
 
Posts: 12
Joined: Wed Nov 28, 2018 6:16 am

Re: can a strategy working on both tick and candle level?

Postby Apprentice » Fri Jan 11, 2019 8:37 am

viewtopic.php?f=28&t=2712
You can use End of Turn_Live Execution Strategy Template.lua as a template.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 29404
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: can a strategy working on both tick and candle level?

Postby helenoftroy » Fri Feb 26, 2021 5:01 pm

Im looking to do the opposite. I have a period (m15) indicator / entry /exit strategies all working fine.
i would like to build a trailing stop that runs on ticks in parallel that may or may not be triggered before exit.
is this possible? I feel its probably quite basic but I cant figure out yet how to do it... any nudge in the right direction would be much appreciated :) thanks in advance
Last edited by helenoftroy on Sat Feb 27, 2021 4:32 am, edited 1 time in total.
helenoftroy
 
Posts: 7
Joined: Wed Dec 30, 2020 6:42 am

Re: can a strategy working on both tick and candle level?

Postby Apprentice » Sat Feb 27, 2021 4:11 am

Your request is added to the development list.
Development reference 235.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 29404
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: can a strategy working on both tick and candle level?

Postby helenoftroy » Sat Feb 27, 2021 4:33 am

That's great. Thank you.
helenoftroy
 
Posts: 7
Joined: Wed Dec 30, 2020 6:42 am

Re: can a strategy working on both tick and candle level?

Postby Apprentice » Wed Mar 03, 2021 1:13 pm

FXTS2 has a built-in trailing stop. All you need is to assign valuemap.TrailStepStop = trailing;
in the request
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 29404
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: can a strategy working on both tick and candle level?

Postby helenoftroy » Fri Mar 05, 2021 2:28 pm

Ahh - yes I've got that working now thanks.

I realise the challenge is to apply a breakeven strategy working on ticks whilst trading different time frame for entry/exit. How would you approach this? Thanks in advance. :)
helenoftroy
 
Posts: 7
Joined: Wed Dec 30, 2020 6:42 am

Re: can a strategy working on both tick and candle level?

Postby helenoftroy » Sat Mar 06, 2021 7:16 pm

Ive been a bit unclear in previous posts sorry Im not a trader.
Im trying to use the “end of turn” template.
My entry is based on period logic.
But once i have a position i would like to use tick stream not period stream with a breakeven strategy.
Is this possible using this template?
Im struggling to mix streams? Is this possible?
TIA
H
helenoftroy
 
Posts: 7
Joined: Wed Dec 30, 2020 6:42 am


Return to Indicator Development

Who is online

Users browsing this forum: No registered users and 1 guest