Breaking down Daily strategies into MTF

Questions about MultiCharts and user contributed studies.
Jonny473
Posts: 68
Joined: 04 Apr 2016
Has thanked: 5 times
Been thanked: 1 time

Breaking down Daily strategies into MTF

Postby Jonny473 » 22 Jun 2018

Lets talk about Multiple time frame strategy. Basically I know how to refer to data1, data2, etc. The issue I am having I have a Daily strategy which I want to break off into a MTF strategy. Therefore I want to consider the current trades with entry and exit timeframes. So from entering the trade until exiting the trade the condition shall be true, that gives me a timespan to examine for the smaller timeframe. Does anybody have a clue how to do that or shall I go into more detail?
Here is a graphical explanation:
Image

So there is one entry and 3 exits--> three conditions for the smaller TF shall erase from that:
Condition1: true from 26.04.2005-16.05.2005
Condition2: true from 26.04.2005-13.07.2005
Condition3:true from 26.04.2005-02.09.2005

So basically the conditions shall be true until the trades in the higher TF are open (MP=1). (Again for the MTF strategy those "trades" shall be converted into conditions).
How can I code those?

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

Re: Breaking down Daily strategies into MTF

Postby TJ » 22 Jun 2018

What is a MTF strategy?

Jonny473
Posts: 68
Joined: 04 Apr 2016
Has thanked: 5 times
Been thanked: 1 time

Re: Breaking down Daily strategies into MTF

Postby Jonny473 » 22 Jun 2018

Multitimeframe consisting of at least 2 data streams (which could be different symbols or just the same symbol with different time intervals (as in my case going from small (15 Min) to higher (Daily).

Jonny473
Posts: 68
Joined: 04 Apr 2016
Has thanked: 5 times
Been thanked: 1 time

Re: Breaking down Daily strategies into MTF

Postby Jonny473 » 07 Aug 2018

I think I got it working somehow now, using ADE and EL; I implemented ADF functions in my strategy and as you said correctly TJ, I had to rewrite the code. It was a journey getting familiar with ADE, the journey is not over yet as I still need to learn some tweaks here and there.
Overall I think ADE is what many (beginner) users thought Multitimeframe in TS/Multicharts is about.

If there are users want to become familiar with ADE I am happy to help, even thinking publishing a document.
I think Bamboo/ Tams (I think the same person) did a great job coding all this- his documents are also good, but for a beginners sometimes hard to get.

@TJ & other users: I somebody familiar with ADE and coding ADF functions?
I have a question coding the Stochastics SlowK. The FastK code is the following:

Code: Select all

Inputs:
Class(StringSimple),
Sym(StringSimple),
Interval(NumericSimple),
BarID(NumericSimple),
StochLength(NumericSimple);

Vars:
SeriesID(0),
BarIndex(0),
CloseList(0),
LL( 0 ), { lowest low }
HH( 0 ), { highest high }
Num( 0 ), { numerator }
Den( 0 ) ; { denominator }



SeriesID = ADE.GetSeries(Class, Sym, Interval, "Close");
BarIndex = ADE.GetBarIndex(Class, Sym, Interval, BarID);

If BarIndex > StochLength then begin
CloseList=ListN.Get(SeriesID, BarIndex);
LL = ADF.Lowest(Class, Sym, Interval, BarID, "Low", StochLength) ;
HH = ADF.Highest(Class, Sym, Interval, BarID, "High", StochLength ) ;

Num = CloseList - LL ;
Den = HH - LL ;

if Den > 0 then
Value1 = (Num / Den) * 100
else
value1 = 0 ;
end;


ADF.FastK=Value1;
Somehow I cant get the SlowK code to work, anybody can help?


Return to “MultiCharts”