MA Crossing Extension.

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

MA Crossing Extension.

Postby mario1985 » Tue Jan 08, 2013 6:38 pm

Hello, Greetings to you. I have one Question or Request.
I´ve already a few experience in programming but i don´t know how to programm something in the Tradingstation and about the programming language.

I´ve written a plan what the Strategy have to do: Some Settings i want to do;
Trading settings
Settings of the EMA´s
Trading Time Settings(no must be, but it would be genius)

It´s nealy the same like the standard MA_Advisor which comes with the program of the FX Trading station.

EMA1 is the short time line
EMA2 is the long time line

But i want something like this: The Strategy should check this programm at the end of each candlebox
Short positions
If there is no position open then:
If EMA1 < EMA 2
then go short and set Trailing Stop(dynamic)
exit
If EMA1 >= EMA 2
then go long and set Trailing Stop(dynamic)
exit
exit
'for the next candle boxes'
If there is a short postion
then If EMA1 > EMA2
then exit short position and open long Position
exit
exit

if there is a long postion
then IF EMA1 < EMA2
then exit long position and open short Position
exit
exit
END

I know that this programm will make a lot of trades, But at another backtest, i saw that this strategy would be very profitable.

I hope someone will help me to programm this strategy.

Thank you very much for your help.
mario1985
 
Posts: 3
Joined: Tue Jan 08, 2013 5:52 pm

Re: MA Crossing Extension.

Postby Apprentice » Wed Jan 09, 2013 5:33 pm

Your request is added to the development list.

One question, Can you clarify Trailing Stop(dynamic)
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: MA Crossing Extension.

Postby mario1985 » Wed Jan 09, 2013 7:44 pm

Hello,

thank you for your fast answer. Sorry for my bad english. But i try to explain what "trailing stop (dynamic)" means.

It´s like that, that the Trailing stop will automaticaly follow for every point. That means, that the price of Trailing stop should not be tightened gradually, but be tightened point for point..
But i want to set the points of Trailing stop manually.

For example
That should the Trailing stop do:
1) Long Position open, Trailing Stop 10 Points Dynamic
09:00 Price 7500 Points Trailing Stop will be set on 7490
09:05 Price 7505 Points Trailing Stop will be set on 7495
09:10 Price 7509 Points Trailing Stop will bei set on 7499
09:15 Price 7500 Points Trailing Stop will stay at 7499
a) 09:20 Price 7520 Points Trailing Stop will be set on 7510
b) 09:20 Price 7490 Points I´m out of Market at 7499
And that should the Trailing Stop NOT do:
2)Long Position open, Trailing Stop 10 Points Step 5 Points
09:00 Price 7500 Points Trailing Stop will be set on 7490
09:05 Price 7505 Points Trailing Stop will be set on 7495
09:10 Price 7509 Points Trailing Stop will stay on 7495
09:15 Price 7500 Points Trailing Stop will stay at 7495
a) 09:20 Price 7520 Points Trailing Stop will be set on 7510
b) 09:20 Price 7490 Points i´m out of Market at 7495

That´s nearly the same but for example the Price on 09:16 will be 7496 at 1) i´m out of the market
at 2) i´m still in the market

And that is what is that "dynamic" meaning. I hope i´ve written the example, so you could easily understand that. if there are any questions, then Ask me.
mario1985
 
Posts: 3
Joined: Tue Jan 08, 2013 5:52 pm

Re: MA Crossing Extension.

Postby mario1985 » Fri Jan 11, 2013 4:34 am

I´m also wanting to set the trading time if it is possible. Thank you
mario1985
 
Posts: 3
Joined: Tue Jan 08, 2013 5:52 pm

Re: MA Crossing Extension.

Postby Alexander.Gettinger » Wed May 01, 2019 7:52 pm

Please try this strategy:
MA_Crossing_Extension.lua
(10.77 KiB) Downloaded 274 times
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk


Return to Indicator and Signal Requests

Who is online

Users browsing this forum: Majestic-12 [Bot] and 15 guests