EMAs cross Strategy

Expand / Collapse
 

EMAs cross Strategy


EMAs cross Strategy

Author: analyst


This strategy uses two Exponential Moving Averages (with periods 5 and 12 by default). When the first moving crosses the second moving upwards, the strategy opens a buy position. When the first moving crosses the other moving downwards, it closes the buy position. and opens a sell position. No other exit points (stops/limits) are used. If there is a need to change the color of one of lines, of the Movings Type, this is possible in strategy settings, before it starts running.







Rate this Download:

Download File


TwoMAs.act TwoMAs.act (3.15 KB, 4,673 views)

User Comments

Click to subscribe to comments RSS feed...
No Member Photo by John posted Friday, February 21, 2014
New Member with 3 recognition pointsNew Member with 3 recognition pointsNew Member with 3 recognition pointsNew Member with 3 recognition pointsNew Member with 3 recognition pointsNew Member with 3 recognition pointsNew Member with 3 recognition pointsNew Member with 3 recognition points
Sorry you don't have permission to rate comments. 0 Sorry you don't have permission to rate comments.

Hi,



While compiling the downloaded file, line 14 generates the following error message: Line 14, Column 36: Unkown type: 'TIndicatorMovingAverage'

Any syntax missing there ?

Thanks for advise

No Member Photo by Download posted Sunday, June 19, 2011
Sorry you don't have permission to rate comments. 0 Sorry you don't have permission to rate comments.
Thanks for the helpful information
No Member Photo by research chemicals... posted Wednesday, June 01, 2011
Sorry you don't have permission to rate comments. 0 Sorry you don't have permission to rate comments.
This article is really good, I like it so much, there are some nice things you share in your blog.
No Member Photo by Stive posted Friday, July 30, 2010
Sorry you don't have permission to rate comments. 0 Sorry you don't have permission to rate comments.

This strategy is not adapted to NFA rules. So you can ask about rewriting this strategy on the forum. I think that somebody will help you.

 

Best regards.

No Member Photo by nighty posted Thursday, July 29, 2010
Sorry you don't have permission to rate comments. 0 Sorry you don't have permission to rate comments.
I have error

EXCEPTION
Exception in TStrategyProcessor
CODE

MESSAGE
Exception at trading strategy "Two EMAs cross" in routine OnNewCandle at Line:Column 54:10
Closing of individual positions is restricted; please contact the dealing desk.
DETAILS

CALL STACK
fx_client.exe=>ShamTradeData.pas=>TShamTradeData.CloseTrade=>87
fx_client.exe=>StrategyProcessor.pas=>TStrategyProcessor.CloseTrade=>197
fx_client.exe=>StrategyProcessor.pas=>TStrategyProcessor.CloseTrade=>193
fx_client.exe=>StrategiesCallMethods.pas=>TStrategiesCallMethods.CM_Functions=>831
fx_client.exe=>fs_iInterpreter.pas=>TfsMethodHelper.GetValue=>1331
fx_client.exe=>fs_iInterpreter.pas=>TfsDesignator.DoCalc=>1910
fx_client.exe=>fs_iInterpreter.pas=>TfsDesignator.DoCalc=>1854
fx_client.exe=>fs_iInterpreter.pas=>TfsDesignator.GetValue=>1951
fx_client.exe=>fs_iInterpreter.pas=>TfsCallStmt.Execute=>2949
fx_client.exe=>fs_iInterpreter.pas=>TfsStatement.Execute=>2866
fx_client.exe=>fs_iInterpreter.pas=>TfsStatement.Execute=>2862
fx_client.exe=>fs_iInterpreter.pas=>TfsIfStmt.Execute=>2979
fx_client.exe=>fs_iInterpreter.pas=>TfsStatement.Execute=>2866
fx_client.exe=>fs_iInterpreter.pas=>TfsStatement.Execute=>2862
fx_client.exe=>fs_iInterpreter.pas=>TfsForStmt.Execute=>3053
fx_client.exe=>fs_iInterpreter.pas=>TfsStatement.Execute=>2866
fx_client.exe=>fs_iInterpreter.pas=>TfsStatement.Execute=>2862
fx_client.exe=>fs_iInterpreter.pas=>TfsIfStmt.Execute=>2979
fx_client.exe=>fs_iInterpreter.pas=>TfsStatement.Execute=>2866
fx_client.exe=>fs_iInterpreter.pas=>TfsProcVariable.GetValue=>1113
fx_client.exe=>Variants.pas=>GetVarDataArrayInfo=>4635
fx_client.exe=>Variants.pas=>VarIsArray=>4780
fx_client.exe=>fs_iInterpreter.pas=>TfsScript.CallFunction=>2505
fx_client.exe=>fs_iInterpreter.pas=>TfsScript.CallFunction=>2496
fx_client.exe=>StrategyProcessor.pas=>TStrategyProcessor.CallFSFunction=>488
fx_client.exe=>StrategyProcessor.pas=>TStrategyProcessor.CallFSFunction=>483
fx_client.exe=>StrategyProcessor.pas=>TStrategyProcessor.SendVisualizerCommand=>862
fx_client.exe=>Classes.pas=>CheckSynchronize=>10847
fx_client.exe=>Classes.pas=>CheckSynchronize=>10824
fx_client.exe=>Forms.pas=>TApplication.WndProc=>9338
USER32.dll=>=>CallNextHookEx=>0
fx_client.exe=>cxContainer.pas=>ApplicationGetMessageMsgHookProc=>6318
fx_client.exe=>Classes.pas=>StdWndProc=>12703
USER32.dll=>=>DispatchMessageW=>0
USER32.dll=>=>DispatchMessageW=>0
fx_client.exe=>Forms.pas=>TApplication.ProcessMessage=>9660
fx_client.exe=>Forms.pas=>TApplication.ProcessMessage=>9630
fx_client.exe=>Forms.pas=>TApplication.ProcessMessages=>9682
fx_client.exe=>Forms.pas=>TApplication.ProcessMessages=>9681
fx_client.exe=>FeedEmulator.pas=>TFeedEmulator.UpdateRowMethod=>278
fx_client.exe=>Classes.pas=>CheckSynchronize=>10847
fx_client.exe=>Classes.pas=>CheckSynchronize=>10824
fx_client.exe=>Forms.pas=>TApplication.Idle=>10264
fx_client.exe=>Forms.pas=>TApplication.Idle=>10234
fx_client.exe=>Forms.pas=>TApplication.HandleMessage=>9690
fx_client.exe=>Forms.pas=>TApplication.HandleMessage=>9689
fx_client.exe=>Forms.pas=>TApplication.Run=>9827
fx_client.exe=>Forms.pas=>TApplication.Run=>9801
fx_client.exe=>Fx_Client.dpr=>=>343
kernel32.dll=>=>BaseThreadInitThunk=>0
...
fx_client.exe=>Classes.pas=>TThread.Synchronize=>11195
fx_client.exe=>Classes.pas=>TThread.Synchronize=>11262
fx_client.exe=>Classes.pas=>TThread.Synchronize=>11257
fx_client.exe=>StrategyProcessor.pas=>TStrategyProcessor.SendSynchronizedCommand=>841
fx_client.exe=>StrategyProcessor.pas=>TStrategyProcessor.SendSynchronizedCommand=>838
fx_client.exe=>StrategyProcessor.pas=>TStrategyProcessor.Execute=>533
fx_client.exe=>Classes.pas=>ThreadProc=>10892
fx_client.exe=>System.pas=>ThreadWrapper=>13816
kernel32.dll=>=>BaseThreadInitThunk=>0

WINDOWS VERSION
6.1.7600
APPLICATION INFO
fx_client.exe 4.2.63/4.2.0
http://a103.sysfx.com:8152/xml/; eforex152; TRADER: ZXR91476
RISE TIME
2010-07-29 14:18:39
Server Time: 2:18:46 PM

No Member Photo by Alfred posted Monday, May 10, 2010
Sorry you don't have permission to rate comments. 0 Sorry you don't have permission to rate comments.
Seems like a strategy instead of Indicator
No Member Photo by Emmanuel posted Tuesday, May 04, 2010
Sorry you don't have permission to rate comments. 0 Sorry you don't have permission to rate comments.
Hello,

Sorry the bad English from a Frenchy -;)

How can create a mixed of this Strategy and this other http://forum.actfx.com/Topic484-6-1.aspx ?
I research the same simple automatic Buy and Sell when EMAs cross, but include a Limit.

The other topic "TwoMas" loose is foundation "open / close" when the MAs cross to integrate only Stop and Limit


Thanks for your help
No Member Photo by analyst posted Thursday, March 04, 2010
Sorry you don't have permission to rate comments. 0 Sorry you don't have permission to rate comments.
Take a look at the first script on this page:

http://forum.actfx.com/Topic484-6-1.aspx

This might be close to what you need.
No Member Photo by Christophe posted Wednesday, March 03, 2010
Sorry you don't have permission to rate comments. 0 Sorry you don't have permission to rate comments.
Hello, the file is compiled but for two EMa cross it's possible to add stop lose ?

Thank for your help
No Member Photo by Christophe posted Wednesday, March 03, 2010
Sorry you don't have permission to rate comments. 0 Sorry you don't have permission to rate comments.
Hello,

I have an error when I compile your file

EXCEPTION
ECompileError in TdxBarButton
CODE

MESSAGE
Can not compile file C:TwoMAs.act
Compilation Error: Unknown type: 'TDataModificationType'
Line: 67, Column 60

Can you help me ?

Thanks


No Member Photo by E.W. posted Friday, December 25, 2009
Sorry you don't have permission to rate comments. 0 Sorry you don't have permission to rate comments.
I have tried it on 30 minutes USDJPY and EURJPY. I had some losing positions, but the general result was good!
No Member Photo by Anwar posted Friday, December 25, 2009
Sorry you don't have permission to rate comments. 0 Sorry you don't have permission to rate comments.
what time frame u use in the chart to test is, couse it give me a bad result in all
No Member Photo by E.W. posted Friday, December 18, 2009
Sorry you don't have permission to rate comments. 0 Sorry you don't have permission to rate comments.
Thank you very much! I wish I were a programmer...
No Member Photo by Charles posted Friday, December 04, 2009
Sorry you don't have permission to rate comments. 0 Sorry you don't have permission to rate comments.
Nice job, analyst!

Very simple, and very useful!


Comment require login or registration.

Details
Type: SCRIPT

Article has been viewed 15,911 times.

Options