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)
Strategy only printing signals historically; no signals on live market.
Can I post about a strategy I am trying to create? I am stuck, and not sure what to add to the code to resolve this issue. The signals for the strategy print out correctly on historical chart information, but never going forward on a live market. I know I am missing something, but not sure how to resolve it. Thanks in advance if anyone can point me in the right direction.
Can you help answer these questions from other members on NexusFi?
I am short on time during the holiday but maybe this will get you started or perhaps someone else will post a solution.
Here are two issues:
There is no code to enter a trade:
i.e. EnterLong(); / EnterShort();
Also there is a logic error in the signal.
The strategy is trying to enter a trade on the current candle but using Close[1]/Open[1] as the trigger.
This means the signal has past in real time and will not trigger.
This can be done but the logic is not correct in the indicator.
You should use Print statements to be sure your parameters are correct on the currentbar.
Here are the parameters shown for the signal on the charts below:
VFST = -400
CumDelta1 = -17
EMA1 = -11.9509422153801
EMA2 = 16032.039996093
EMA3 = 16035.8225645426
I added the chart indicators so I could see the logic.
I could not add the EMA1 because it makes the chart unviewable (11.9)
I also added the backcolor on the signal candle
Here are two examples of the chart
Live
After live with manual refresh Historical
Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
By the way, I run this on mean Renko or Uni renko bar charts.
Thanks for the response, but I am not following where the error is or how to use print statements? I will look to see if I can find something on print statements, but perhaps you can indulge me for a few more questions/observations? I appreciate your responses thus far. Very Helpful.
As far as I can tell, the trigger relies on 4 parameters. Are you saying that the if ((Close[1] < Open[1]) is the issue and that by being the first statement based on the previous bars data, causes the issue? It's followed by 3 && statements all based on the current bar.
Below, there are 4 parameter that cause the bar color change and the arrow. That's all I am seeking at this moment. No entry, target, or stop logic. I created most of this in the strategy builder, and added in the
( AddDataSeries(Data.BarsPeriodType.Tick, 1); )
based on something I found on the NT forum using the Ninjascript Editor, but still no signals in real time; just historic signals which all look correct on the chart when I apply the strategy, but only historically.
I'm still learning, so I appreciate any explanation to help me understand where I went astray.
protected override void OnBarUpdate()
{
if (BarsInProgress != 0)
return;
I get a lot of requests for help building strategies. Many of which are repeats of other requests. I am starting this thread to handle many of these requests as the public building and revising of strategies would certainly help the community. Please …
As far as using print statements you add this to your code in places you want to see the values of the indicators used: For example: post the prints you want to see after the Draw.Arrow command or any place you want to see the values.
Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !