Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I have struggled a little trying to get this programmed correctly. I will give the rules and then also include a screenshot as well.
I would like to make this so that I can adjust and optimize the targets and stops. Everything else is well tested enough to convince me that it is a sound strategy.
For Longs:
Low[0] > SMA(50)[0] Note: Low from the current closed bar is above the 50 SMA
Close[0] > SMA(50)[0] Note: The close from the current closed bar is also greater than the 50 SMA
RSI(5,1).Ave[1] <50 Note: The RSI value from one bar ago was less than 50
RSI(5,1).Ave[0] >50 Note: The RSI value from the current closed bar is greater than 50
RSI(5,1).Ave[0] <60 Note: The RSI value of the current bar is also less than 60
Close[0] > EMA(15)[0] Note: The close of the bar is above the EMA 15 line
For Shorts:
High[0] < SMA(50)[0] Note: High from the current closed bar is below the 50 SMA
Close[0] < SMA(50)[0] Note: The close from the current closed bar is also less than the 50 SMA
RSI(5,1).Ave[1] >50 Note: The RSI value from one bar ago was more than 50
RSI(5,1).Ave[0] <50 Note: The RSI value from the current closed bar is less than 50
RSI(5,1).Ave[0] >40 Note: The RSI value of the current bar is also greater than 40
Close[0] < EMA(15)[0] Note: The close of the bar is below the EMA 15 line
The long and short entry should be one tick above the high or low of the trigger candle so that I can let price pull me into the trade.
Not sure if this needs to be created as an indicator first from which I can then trigger a trade, but I'd like to see the condition painted to the screen when the criteria is met.
Using the Wizard I am able to get the code to work on the longs but then was unable to make those entries variable on the strategy analyzer. I was also not successful in getting the condition to paint to the active screen in realtime.
Can you help answer these questions from other members on NexusFi?
Hi and thank you for your willingness to give this a try.
I have attached the CS and XML files.
What I am attempting to accomplish:
1. Be able to add an additional contract with different profit and stop settings and the ability to move to break even once the first target is reached.
2. Have a constant line on the RSI plot for the '50' line.
3. Set a start and stop time for the strategy to run.
4. Be able to set the number of ticks above or below the trigger candle for trade entry. I'd like to be pulled into the trade if price goes in my desired direction. The minimum number of ticks used as a pull-in will be one but I plan to be able to optimize this to see if several ticks is best.
5. Perhaps be able to hear an audible when the condition is met for live trading.
6. Is it possible no the STOP loss to have 2 options - one based on ticks and the other based on a close above or below the trigger candle?
7. The trade would remain valid so long as the conditions are still met. At first I assumed that I would have to enter only on the next bar after the trigger candle, however I have noticed that so long as the condition is still valid then the trade will still work out one tick beyond the trigger candle. (if at any point after the initial condition is met but before being pulled into the trade, if any one of the conditions goes outside of the setup condition, then the trade should be invalidated and cancelled.
Would you let me know if it is possible to code for the trade to only be valid if the SLOPE of the EMA line is not flat and is in the direction of the trigger candle? I am not certain how best to define what the slope should be, but for certain the greatest issue with this strategy is when I get signals while the EMA slope is sideways.
Thank you very much for your assistance! The Wizard gets me close but some items I cannot figure out.