Alligator strategy (with filter and exit position)

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

Alligator strategy (with filter and exit position)

Postby william17 » Thu Jul 06, 2017 4:12 pm

Hello,

I need help please,

I'm looking for a strategy who works on the following idea:

the strategy needs some indicators = alligator, ichimoku, dmi, and two ema
And two timeframes

For buy:
crossover lips on teeth with lips > jaw (alligator indicator), and di+>di- (dmi indicator), so open buy if on the bigger timeframe the kinjun > or = SB
And
crossover lips on jaw with lips > teeth (alligator indicator), and di+>di- (dmi indicator), so open buy if on the bigger timeframe the kinjun > or = SB

We need to set the period of the bigger timeframe of course.

Exit buy :
crossunder lips on teeth (with option "use filter, yes or no")
Or
crossunder di+ on di- (with option "use filter yes or no")
Or
crossunder ema on ema2 (with option "use filter yes or no", and possibility to set the period of each ema)


For sell:
crossunder lips on teeth with lips <jaw (alligator indicator), and di+<di- (dmi indicator), so open sell if on the bigger timeframe the kinjun < or = SB
And
crossunder lips on jaw with lips < teeth (alligator indicator), and di+<di- (dmi indicator), so open sell if on the bigger timeframe the kinjun < or = SB

We need to set the period of the bigger timeframe.

Exit sell:
crossover lips on teeth (with option "use filter yes or no")
Or
crossover di+ on di- (with option "use filter yes or no")
Or
crossover ema on ema2 (with option "use filter yes or no", and the possibility to set the period of each ema)

thank you very much
william17
 
Posts: 52
Joined: Wed Feb 08, 2017 9:24 am

Re: Alligator strategy (with filter and exit position)

Postby Apprentice » Wed Jul 12, 2017 3:41 pm

Can you confirm.
We will open Long if two time frames will confirm.

 Lips / teeth crossover
 Lips> jaw
 And +> di-
 Kinjun> = SB

One note, Have cross, on two-time frames, at the same time, is a black swan event.

Will exit use one of two time frames.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Alligator strategy (with filter and exit position)

Postby william17 » Thu Jul 13, 2017 2:52 pm

I confirm two time frames,

on the first (the small):
Lips / teeth crossover
 Lips> jaw
 And +> di-

On the second (the bigger):
Kinjun> = SB

Will exit on the first time frame (the small)

Thank you
william17
 
Posts: 52
Joined: Wed Feb 08, 2017 9:24 am

Re: Alligator strategy (with filter and exit position)

Postby william17 » Mon Jul 24, 2017 4:32 pm

Hello Apprentice,

I would like to know how write the code to explain the following idea to the expert advisor:

open buy when Lips cross over Teeth and Lips > Jaw

And

open sell when Lips cross under Teeth and Lips < Jaw

I would like to write this idea with indicore sdk but i don't know how do that?

Thank you very much
william17
 
Posts: 52
Joined: Wed Feb 08, 2017 9:24 am

Re: Alligator strategy (with filter and exit position)

Postby Apprentice » Tue Jul 25, 2017 9:36 am

I tried to write your strategy.
Unfortunately, I have some problems.
It looks like TS bug.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Alligator strategy (with filter and exit position)

Postby william17 » Tue Aug 01, 2017 4:20 pm

Ok,
Thank you very much, and don't worry, i have found the solution for this strategy...

But i have a last question for you,

I would like to add to my strategy a trailing stop fixed (not dynamic), but i don't understand how we can write the code for that and add it with all the code under indicore for my strategy...

In fact, we have a trailing stop fixed under the marketscope 2.0 available when we open an order...
Please, see the picture attached,

And i want exactly this stop,

Could you help me about that please?

Thank you
Attachments
Capture.PNG
trailing stop fixed available in the parameters
william17
 
Posts: 52
Joined: Wed Feb 08, 2017 9:24 am

Re: Alligator strategy (with filter and exit position)

Postby Apprentice » Mon Aug 14, 2017 4:45 am

Your request is added to the development list, Under Id Number 3854
If someone is interested to do this task, please contact me.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Alligator strategy (with filter and exit position)

Postby PetroIV » Tue Aug 15, 2017 9:54 am

I would like to add to my strategy a trailing stop fixed (not dynamic), but i don't understand how we can write the code for that and add it with all the code under indicore for my strategy...

You cau use TrailStepStop params when create a order.

TrailStepStop
http://www.fxcodebase.com/bin/products/IndicoreSDK/3.3.0/help/Lua/web-content.html#orderparams.html

TrailStepStop
The value is expressed in pips.
If the value is 1, it means that the dynamic trailing mode is used, i.e. the order rate is changed with every change of the market price. Please note that in some systems, only dynamic trailing mode is supported. See core.host:execute("getTradingProperty", ...) for details about permitted types of the trailing mode. In case only dynamic trailing stop is supported, any non-zero value of this parameter will cause creating a dynamic trailing stop.
The value is optional. By default, this value is 0. 0 means no-trailing order.

Example:
Code: Select all
local isNeedDynamicTrailing = false;
local TrailingStop = 10;

function CreateOrder(rate)
local valuemap, success, msg;
valuemap = core.valuemap();
valuemap.Command = "CreateOrder";
....
if isNeedTrailing then
valuemap.TrailStepStop = ( isNeedDynamicTrailing and 1 or TrailingStop);
end
success, msg = terminal:execute(200, valuemap);
...
return msg;
end
PetroIV
 
Posts: 24
Joined: Tue Aug 15, 2017 9:45 am

Re: Alligator strategy (with filter and exit position)

Postby william17 » Tue Aug 22, 2017 5:35 pm

Thank you for your reply,

Effectively, i have seen some experts advisors with a trailing stop fixed...

I have read your reply to add it into the code of my strategy under indicore sdk and so, have a trailing stop fixed available in the parameters of the expert advisor...

But i have a problem, i can't generate the code to make a lua folder available under marketscope,
i think that i don't use well the indicore sdk,

Do you know what i have to do when i'm under indicore lua editor and when i have finish the writing of my strategy, what i have to do to debugg the code and generate the folder to find it under marketscope? what is the process?
william17
 
Posts: 52
Joined: Wed Feb 08, 2017 9:24 am

Re: Alligator strategy (with filter and exit position)

Postby william17 » Thu Sep 14, 2017 10:02 am

Hello Petro IV,

I have an ask for you please,

Could you give a example of expert advisor with "TRAILING STOP FIXED".

I tell you about that because i would like to see how you write the code like with the example you have done in your last reply...

For example, with an expert advisor very simple (cross over/under of 2 ema on 1 time frame), but with the "trailing stop fixed",
I would like to know how you add the TrailStepStop params in the writing of a strategy please,

Thank you,
william17
 
Posts: 52
Joined: Wed Feb 08, 2017 9:24 am

Next

Return to Indicator and Signal Requests

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 15 guests