NexusFi: Find Your Edge


Home Menu

 





Incorrect trading signals using renko bars on data stream 2


Discussion in MultiCharts

Updated
    1. trending_up 1,304 views
    2. thumb_up 3 thanks given
    3. group 3 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread

Incorrect trading signals using renko bars on data stream 2

  #1 (permalink)
mattyham
Ottawa, Ontario
 
Posts: 1 since Feb 2015
Thanks Given: 1
Thanks Received: 1

Hi. I am trying to create a simple automated trading signal that uses a renko chart on data stream 2 to generate signals at the close of a full renko bar, and then enter/exit trades on a time based bar chart on data stream 1. Nothing fancy, just trying to learn how to do this sort of thing. Backtesting on the code I have created indicates that it "works", but testing in real-time is another story. It seems to be entering trades before a full renko bar on data stream 2 has actually closed. In my settings, I have intrabar order generation off. Can anyone point out where I am going wrong. The code is as follows:

[IntrabarOrderGeneration = false] ;

Condition1 = close of data2 > open of data2 and close[1] of data2 < open[1] of data2 ;
Condition2 = close of data2 < open of data2 and close[1] of data2 > open[1] of data2 ;

If CurrentBar > 1 and BarStatus(1) of data2 = 2 and condition1 and marketposition = 0 then begin
Buy ( "LE" ) next bar at market ;
end ;

If CurrentBar > 1 and BarStatus(1) of data2 = 2 and condition2 and marketposition > 0 then begin
Sell ( "LX" ) next bar at market ;
end ;

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
How to apply profiles
Traders Hideout
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
REcommedations for programming help
Sierra Chart
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
31 thanks
Spoo-nalysis ES e-mini futures S&P 500
28 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
20 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

mattyham,

your code might use BarStatus incorrectly.


Quoting 
BarStatus(DataNum)

Where: DataNum - a numerical expression specifying the data number of the series

If DataNum is not specified, a value for the current data series will be returned.

The print reserved word might be helpful for you to evaluate the internal values of variables and reserved word within your code.


Regards,

ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #3 (permalink)
 GuppyDRV 
Seattle
 
Experience: Intermediate
Platform: MultiCharts 10
Broker: InteractiveBrokers, IQFeed
Trading: ES
Posts: 58 since Nov 2015
Thanks Given: 19
Thanks Received: 7


Just wondering if you have had any luck with this problem. I’m having the same isssue where my strategy is taking trades prior to the close of bar when using Renko. Works great when a Renko Bar forms on the first time interval but not when the bar goes beyond the first iteration.

I have this thread on the topic:




For backtest you will need to use (buy this bar on close). I might also suggest setting up a bid/ask series so that the trades happen at the correct price else they will occur at the Renko Bar price and not the underlying market price.

GuppyDRV

Just saw that you have an underlying data series which might solve the price issue if it’s the same time interval as the Renko! This will get you close, however a bid/ask for precise backtest is always advisable!

Reply With Quote




Last Updated on September 22, 2019


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts