EMA & RSI CROSS OVER STRATEGY


Category:
0
0

I HAVE BEEN TRYING TO FIGURE OUT HOW TO CREATE THIS STRATEGY ON TOS AND THIS IS WHAT I HAVE SO FAR.  THE RULES ARE 1ST THEN THE CODE:

  • 5 EMA: blue line
  • 10 EMA: red line
  • RSI (10) applied to the median price (HL/2)

Entry Rules

BUY when the 5 EMA crosses above the 10 EMA from underneath and the RSI crosses above the 50.0 mark from the bottom.

SELL when the 5 EMA crosses below the 10 EMA from the top and the RSI crosses below the 50.0 mark from the top.

Exit Rules

Use a 50-pip trailing stop and a 200-pip profit target.

MovAvgExponential(“length” = 5).”AvgExp” crosses below MovAvgExponential(“length” = 10).”AvgExp” and RSI(“length” = 10, “over bought” = 50, “over sold” = 50, “price” = hl2).”RSI” crosses below RSI(“length” = 10, “over bought” = 50, “over sold” = 50, “price” = hl2).”OverSold”

IT SHOWS UP ON MY SCREEN BUT WHEN THE CODE IS PLACED WITH AN ORDER, IT DOESN’T TRIGGER THE ORDER BUT  IT DOES SHOW THE STRATEGY ON THE CHART. THANK YOU FOR ALL YOUR HELP.

 

Marked as spam
Posted by (Questions: 2, Answers: 2)
Asked on April 23, 2018 6:11 pm
626 views
0

Hi Pete, I want to thank you for all your help again. Question? I’m using the same strategy that is attached to this thread. I want to back test this strategy but I don’t think Think or Swim can do it.

HLHB Forex Trend-Catcher

The chart settings needed?
YTD/D chart
5 EMA: blue line
10 EMA: red line
RSI (10) applied to the median price (HL/2)
Entry Rules
BUY when the 5 EMA crosses above the 10 EMA from underneath and the RSI crosses above the 50.0 mark from the bottom.
SELL when the 5 EMA crosses below the 10 EMA from the top and the RSI crosses below the 50.0 mark from the top.
Make sure that the RSI did cross 50.0 from the top or bottom and not just ranging tightly around the level.

Exit Rules
Use a 150-pip trailing stop and a 400-pip profit target. This increases the chances of the system riding longer trends. Close the trade when a new signal materializes.

Thank you again for all your help and this is not a test like the last time we talked lol ?I remember the last question I had for you was a difficult one but I’m definitely not doing that I’m just not good at writing or understanding code. Anyway, thanks and I’ll be waiting for your response.

( at July 15, 2018 6:51 am)
0

In order to write code for a strategy that includes a trailing stop and/or a profit target requires advanced techniques. This is not something we would provide at no charge in our Q&A forum.

( at July 15, 2018 7:37 am)
0

Would you be able to provide the code for a cost? If so how much?

( at July 15, 2018 3:50 pm)
0

Yes, this is a service we offer. You can get all the details here: https://www.hahn-tech.com/about/

( at July 15, 2018 5:33 pm)
0
Private answer

Shhhh! No need to yell. We can hear you just fine without using all caps.

In your question you begin by talking about how to get this code to work in a strategy. However in the last paragraph you are speaking about using the code in an order. So I am taking that route. Not a strategy, but a conditional order.

Before even taking the time to test your code I need to make everyone aware of the most common fault I see in using conditional orders.

First rule in using conditional orders. Check that the “price rules” setting is changed from it’s default value of LIMIT to the required value of MARKET.

Screenshot below shows where to find this setting.

If this does not clear up the issue, please let us know.

Attachments:
Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on April 23, 2018 8:09 pm
0
Private answer

Hi Pete, sorry about having all caps. I wasn’t yelling and i didn’t even notice I had the Caps Lock on lol. Anyways, thanks for your help and putting all this time and effort into helping people out on these platforms. I do understand that before you hit save and send the order you must have the market order selected and that what I have done. How ever, the trade triggers but then it immediately stops. I trade FOREX and I do use stops and limits with the trade so every trade i place is an “Advanced Order: 1st triggers OCO (One Cancels Other)”

I’m trying to get this strategy to work using the Semi-Automated System TOS has so I can still have a life lol. I watched all of your videos and read tons of Q&A and I’m still kind of confused on how to put it all together. I attached screen shots of the process and the pictures are in order in regards to the process of how I compile the order to place the trade. Hope this information helps you understand what I’m trying to do.  As far as I can tell, it’s the same thing you do in the videos. Again, thank you for all your time and effort.

Attachments:
Marked as spam
Posted by (Questions: 2, Answers: 2)
Answered on April 24, 2018 5:55 am
0

My first major clue is this: “the trade triggers but then it immediately stops”. So immediately we can completely ignore the code. The problem is in the setup of your OCO order. You are using fixed values for your OCO limit and stop.

Your entry is dynamic and your exits are static. You don’t know ahead of time at what price the entry is going to execute. Since you are getting immediately stopped when the entry is made, my initial though is that the entry is occurring below the fixed value you set for the stop loss section of your OCO.

On very close examination I see that your limit and stop orders have lock icons. (I don’t know how you did that).

I created my order from the Trade tab, by right-clicking on the Ask and selecting “Buy Custom –> with OCO bracket”. It’s a built in order template.

When I create an OCO for the same instrument they contain link icons. When you click the link icons they break. This creates a bracket with exits that vary (+/-) based on the entry price. The method you are using is static.

I repeated myself a bit there just so I could make sure the main point was made.

( at April 24, 2018 8:07 am)
0

Hi Pete, Ok, so, I clicked “Buy Custom –> with OCO bracket” and I clicked the link icons and I had one trade trigger but now I’m having another issue. I tried it on a 1 minute chart and it’s not working. Is this time frame specific? How do I know which time frame this strategy is set for or looking at?

( at April 25, 2018 5:53 am)
0

Time frame. Go back to your 4th screenshot and check the upper left. You will see it is set to ‘D’, daily. That is where you change the time frame.

( at April 25, 2018 7:28 am)