HI Guys, I hope you will like my EA and help me improve it.
This EA is an auto-trading program designed to take multiple trades per pair if the conditions are met based on the guiding strategy below.
Strategy: Use Larger Time Frames to determine if conditions are “Buy Ready” or “Sell Ready”. Decisions on Large Time Frames are guided by MACD and RSI.
Use Smaller Time Frames to determine if trades are “Buy Ready” or “Sell Ready” and execute trades based on TMA and EMA (based on NanningBob's 6.0 strategy).
Buy Criteria:
Buy Ready1: If MACD is below zero and Current MACD is less than Signal MACD and Previous MACD is greater than Previous Signal MACD.
Buy Ready2: If Bid is less than Small Time Frame TMA buy line and Small Time Frame EMA.
Buy Signal: If BuyReady1 is true and BuyReady2 is true and Bid is greater than Small Time Frame TMA & EMA.
Sell Criteria:
Sell Ready1: If MACD is above zero and Current MACD is greater than Signal MACD and Previous MACD is less than Previous Signal MACD.
Sell Ready2: If Ask is greater than Small Time Frame TMA buy line and Small Time Frame EMA.
Sell Signal: If SellReady1 is true and SellReady2 is true and Ask is less than Small Time Frame TMA & EMA.
TP & SL
There a multiple ways to manage exits. There are ATR based TP and SL. Jump stops, breakeven stops and trailing stops, all that also have ATR based parameters if desired. This program will close all Buys when the first Sell Ready1 Signal is given and vice versa.
Most of the parameters are pretty standard. These parameters might need more explanation.
MaxTrades = 50 - number of buys or sells allowed to open. This EA only trades in 1 direction at a time Buy or Sell. I would allow multiple trades - makes the bot more profitable, but all depends on your account size and lot size.
TradeLotMult = 10 - Will increase Lot size every 10 trades. Watch how this works in back testing and forward testing. First 10 trades, lotsize = 1*0.01 = .01, next 10 trades 11-20, lotsize = 2*0.01 = .02 etc. Play with this in your testing.
SetBuyReady1 = false - At start up if you think BuyReady1 conditions have been met, you can set this to true and it will look for BuyReady2 condtions.
SetSellReady1 = false At start up if you think SellReady1 conditions have been met, you can set this to true and it will look for SellReady2 condtions.
LargeTimeFrame = 60 - 1H, use what works for you. 4H would be 240, D1 would be 1440. I use 60 for 60 minutes
SmallTimeFrame = 5 - 5M, use what works for you, just make it is lower than the LargeTimeFrame. I use 5 for 5 minutes.
Buys_Below_Zero_Only = true - Only will perform Buys when MACD is below zero - safer more conservative approach
Sells_Above_Zero_Only = true - Only will perform Sells when MACD is above zero - safer more conservative approach
Use_RSIFilter = true - Only performs Buys if RSI is above zero - safer more conservative approach; Only performs Sells if RSI is below zero - safer more conservative approach;
My Settings are the defaults, but I'm looking at Optimizing the MACD, RSI, and ATR profit and stop losses in the future. This is basically it. Please feel free to ask any questions. I will try to answer.
I'm attaching the EA, my template, TMA Centered indicator and a picture of a 1H chart and 5M chart for GBPJPY.
My day time job is mainframe programming. I bought a book on EA writing and have used that with many ideas from the group here at FF - so thanks to all of you.
TallCoolOne
NEW STUFF.
I have created a small time frame template with the TMA and buy and sell MA.
You will need the MARI EA V3.0 to work with this template. Coding changes were required.
You can still use MARI EA V2.0 on the mari tpl and the your trading will be the same. The smaller time frame template and new EA allow you to see the trades execute because of the TMA & MA criteria.
This EA is an auto-trading program designed to take multiple trades per pair if the conditions are met based on the guiding strategy below.
Strategy: Use Larger Time Frames to determine if conditions are “Buy Ready” or “Sell Ready”. Decisions on Large Time Frames are guided by MACD and RSI.
Use Smaller Time Frames to determine if trades are “Buy Ready” or “Sell Ready” and execute trades based on TMA and EMA (based on NanningBob's 6.0 strategy).
Buy Criteria:
Buy Ready1: If MACD is below zero and Current MACD is less than Signal MACD and Previous MACD is greater than Previous Signal MACD.
Buy Ready2: If Bid is less than Small Time Frame TMA buy line and Small Time Frame EMA.
Buy Signal: If BuyReady1 is true and BuyReady2 is true and Bid is greater than Small Time Frame TMA & EMA.
Sell Criteria:
Sell Ready1: If MACD is above zero and Current MACD is greater than Signal MACD and Previous MACD is less than Previous Signal MACD.
Sell Ready2: If Ask is greater than Small Time Frame TMA buy line and Small Time Frame EMA.
Sell Signal: If SellReady1 is true and SellReady2 is true and Ask is less than Small Time Frame TMA & EMA.
TP & SL
There a multiple ways to manage exits. There are ATR based TP and SL. Jump stops, breakeven stops and trailing stops, all that also have ATR based parameters if desired. This program will close all Buys when the first Sell Ready1 Signal is given and vice versa.
Most of the parameters are pretty standard. These parameters might need more explanation.
MaxTrades = 50 - number of buys or sells allowed to open. This EA only trades in 1 direction at a time Buy or Sell. I would allow multiple trades - makes the bot more profitable, but all depends on your account size and lot size.
TradeLotMult = 10 - Will increase Lot size every 10 trades. Watch how this works in back testing and forward testing. First 10 trades, lotsize = 1*0.01 = .01, next 10 trades 11-20, lotsize = 2*0.01 = .02 etc. Play with this in your testing.
SetBuyReady1 = false - At start up if you think BuyReady1 conditions have been met, you can set this to true and it will look for BuyReady2 condtions.
SetSellReady1 = false At start up if you think SellReady1 conditions have been met, you can set this to true and it will look for SellReady2 condtions.
LargeTimeFrame = 60 - 1H, use what works for you. 4H would be 240, D1 would be 1440. I use 60 for 60 minutes
SmallTimeFrame = 5 - 5M, use what works for you, just make it is lower than the LargeTimeFrame. I use 5 for 5 minutes.
Buys_Below_Zero_Only = true - Only will perform Buys when MACD is below zero - safer more conservative approach
Sells_Above_Zero_Only = true - Only will perform Sells when MACD is above zero - safer more conservative approach
Use_RSIFilter = true - Only performs Buys if RSI is above zero - safer more conservative approach; Only performs Sells if RSI is below zero - safer more conservative approach;
My Settings are the defaults, but I'm looking at Optimizing the MACD, RSI, and ATR profit and stop losses in the future. This is basically it. Please feel free to ask any questions. I will try to answer.
I'm attaching the EA, my template, TMA Centered indicator and a picture of a 1H chart and 5M chart for GBPJPY.
My day time job is mainframe programming. I bought a book on EA writing and have used that with many ideas from the group here at FF - so thanks to all of you.
TallCoolOne
NEW STUFF.
I have created a small time frame template with the TMA and buy and sell MA.
You will need the MARI EA V3.0 to work with this template. Coding changes were required.
You can still use MARI EA V2.0 on the mari tpl and the your trading will be the same. The smaller time frame template and new EA allow you to see the trades execute because of the TMA & MA criteria.
Attached File(s)
mari.tpl
2 KB
|
1,481 downloads
Mari Charts.zip
114 KB
|
1,986 downloads
TMA CENTERED MARI.mq4
9 KB
|
1,905 downloads
MARI_EA V2.0.mq4
45 KB
|
1,194 downloads
|
Uploaded Nov 22, 2010 8:25pm
mari stf.tpl
6 KB
|
1,121 downloads
|
Uploaded Nov 23, 2010 6:33pm
MARI_EA V3.0.mq4
45 KB
|
1,485 downloads
|
Uploaded Nov 23, 2010 6:33pm