Help with Easy Language Strategy with Renkos - futures io
futures io



Help with Easy Language Strategy with Renkos


Discussion in MultiCharts

Updated
      Top Posters
    1. looks_one jkepha with 4 posts (0 thanks)
    2. looks_two greenroomhoo with 3 posts (0 thanks)
    3. looks_3 Big Mike with 1 posts (3 thanks)
    4. looks_4 ernmen with 1 posts (0 thanks)
    1. trending_up 3,636 views
    2. thumb_up 4 thanks given
    3. group 6 followers
    1. forum 11 posts
    2. attach_file 1 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • 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 and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Help with Easy Language Strategy with Renkos

(login for full post details)
  #1 (permalink)
 greenroomhoo 
annapolis USA
 
Experience: Intermediate
Platform: Ninja, MC, Sierra, Amibroker
Broker: PFG (too bad), IB, Fidelity, AMP
Trading: ES, NQ, Equities, Forex, Etc.
 
greenroomhoo's Avatar
 
Posts: 276 since Jun 2011
Thanks: 107 given, 234 received

Im about to blow my head off with frustration on a coding issue i cannot figure out. I have a strat i am running on daily renkos. The entry is not relevant but i am having an issue with my trailing stops in the strategy. The logic i am trying to code is relatively simple.

A trailing stop off the last pivot low that moves up after a new higher pivot low is formed. The initial stop is the higher of the last pivot low or 95% of the entry price. see code excerpt below:

if marketposition = 0 then
begin
if condition7 then buy 100 shares next bar at market;
end;

//Long Stop Language
Condition20 = PivotLowVSBar( 1, low,Leftstrength, rightstrength, rightstrength+1) <> -1 ; // if new pivot low forms this is true
if marketposition = 0 and condition20 then longpivotstop = Low[rightStrength]; // when flat and a new pivot low forms, the intrabarpersist variable longpivotstop is set
//equal to the Low of the bar at the new pivot
if marketposition = 1 and condition20 and Low[rightstrength]>Longpivotstop then LongPivotStop = Low[rightStrength]; // when long and a new pivot forms that is higher than the last
//pivot low, longpivotstop is reset to the new higher low.
if marketposition = 1 then begin
currentlongstop = Entryprice*.95; //sets initial stop to 5% from entryprice
If Longpivotstop > currentlongstop and longpivotstop<last then currentlongstop = longpivotstop;
Sell ( "Pivot LX" ) next bar at currentlongstop stop;
end;

The above code seems to generally work ok but there is something i am missing. See attached screen shot i marked up.

Any ideas with what i am screwing up in my logic? its making me crazy.....

Attached Thumbnails
Click image for larger version

Name:	7-2-2012 8-48-07 PM.png
Views:	201
Size:	43.6 KB
ID:	79938  
Visit my futures io Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
Thinkorswim MACD Thinkscript
ThinkOrSwim
Tradenlernen martin popov
Trading Reviews and Vendors
Weather services for trading NG
Trading Reviews and Vendors
Anybody uses Bookmap with Tradestation?
TradeStation
Futures education program reviews
Trading Reviews and Vendors
 
Best Threads (Most Thanked)
in the last 7 days on futures io
How much do you know about Bitcoin?
128 thanks
I finally blew up an account
43 thanks
Big Mike in Ecuador
27 thanks
The tiyfTradePlanFactory indicator
25 thanks
EdgeProX from Edge Clear
24 thanks
 
(login for full post details)
  #2 (permalink)
 Big Mike 
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: Custom solution
Trading: Futures & Crypto
 
Big Mike's Avatar
 
Posts: 50,094 since Jun 2009
Thanks: 32,557 given, 98,585 received

Please remember Renko's and backtesting don't go well together. Renko's have false opens, and all backtest results will be false.

Best way to troubleshoot your issue in my opinion would be to print the trailing stop price to a debug window, along with a time stamp, so you can see what is happening.

I assume if you change the dataseries to something less exotic, like a 1-range bar, that it works correctly? If so, likely the issue is the Renko bar itself and the false prices.

You could make the first dataseries a 1-range, and the second dataseries your Renko. MultiCharts only allows execution on the first dataseries. Signals could be generated from the secondary series.

Mike

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/

Visit other sites? Please spread the word about your experience with our community!
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
The following 3 users say Thank You to Big Mike for this post:
 
(login for full post details)
  #3 (permalink)
 greenroomhoo 
annapolis USA
 
Experience: Intermediate
Platform: Ninja, MC, Sierra, Amibroker
Broker: PFG (too bad), IB, Fidelity, AMP
Trading: ES, NQ, Equities, Forex, Etc.
 
greenroomhoo's Avatar
 
Posts: 276 since Jun 2011
Thanks: 107 given, 234 received


thanks mike. ill try that. i understand about the limitations of backtesting and renkos...

Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #4 (permalink)
 greenroomhoo 
annapolis USA
 
Experience: Intermediate
Platform: Ninja, MC, Sierra, Amibroker
Broker: PFG (too bad), IB, Fidelity, AMP
Trading: ES, NQ, Equities, Forex, Etc.
 
greenroomhoo's Avatar
 
Posts: 276 since Jun 2011
Thanks: 107 given, 234 received

hey mike - i did what you said and figured out my logic issue. if anyone wants the code for trailing pivots i came up with i can post. many thanks

one quick follow up question - I am struggling with coding renkos as data2 for triggering entries and exits. my issue comes with data1 (regular minute bars) having many more bars than data2 (renkos). when there are no renkos in data2 - i get entries and exits on data1.

Im sure there is some boneheaded function i am missing. I tried using "barstatus <> = -1" but that only fixed some of my incorrect entries on data1.

What am i missing?

Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #5 (permalink)
jkepha
San Antonio, TX
 
 
Posts: 27 since Apr 2020
Thanks: 7 given, 6 received

Hi Greenroomhoo,

I have been having trouble creating the code to make a simple renko strategy in easylanguage. Anyway you could share your code? I'd be happy to help you figure out any problems you may be having if that adds any value. Anything would be appreciated.

Thanks,
Ryan

Reply With Quote
 
(login for full post details)
  #6 (permalink)
 Gillou 
Bordeaux, FRANCE
 
Experience: Advanced
Platform: MULTICHARTS
Broker: IB
Trading: Eurex
 
Posts: 8 since Oct 2010
Thanks: 2 given, 0 received

issue in backtest with Renko...


https://www.multicharts.com/discussion/viewtopic.php?t=52327

Reply With Quote
 
(login for full post details)
  #7 (permalink)
jkepha
San Antonio, TX
 
 
Posts: 27 since Apr 2020
Thanks: 7 given, 6 received

Ah I see. Thanks. Have you ever come across any code for Renko charts?

Reply With Quote
 
(login for full post details)
  #8 (permalink)
 Sinatra Fan 
Orlando FL
 
Experience: Intermediate
Platform: MultiCharts, Ninja
Trading: Emini ES
 
Sinatra Fan's Avatar
 
Posts: 38 since May 2019
Thanks: 5 given, 6 received

The biggest problem with Renkos and backtesting is that MC will assume the entry is at open which is pretty much impossible. So I created a BACKTESTING version of my signal to be used ONLY for backtesting, where my signal instructions are the same, but the entries and exits are THIS BAR ON CLOSE... instead of next bar market, limit whatever. This bar on close will give you the closest to real results you will get. I did this and now my live trading results are very similar to my backtesting.

Hope this helps.

Reply With Quote
The following user says Thank You to Sinatra Fan for this post:
 
(login for full post details)
  #9 (permalink)
rgrof
Brno, Czech Republic
 
 
Posts: 1 since Jun 2020
Thanks: 0 given, 0 received

Hi,

can anyone help me with easylanguage code - for strategy to backtest in tradestation?

Here it goes - if condition1 is met /for example O>C/ then close/sell trade next day on Open at market

Thanks in advance for your support

Reply With Quote
 
(login for full post details)
  #10 (permalink)
jkepha
San Antonio, TX
 
 
Posts: 27 since Apr 2020
Thanks: 7 given, 6 received


Yeah this is pretty simple. Try googling and looking at examples of people's code. I'm not in front of comp.

Open is o[1] for PREV bar

Reply With Quote
 
(login for full post details)
  #11 (permalink)
jkepha
San Antonio, TX
 
 
Posts: 27 since Apr 2020
Thanks: 7 given, 6 received

Condition1 = c[0]>o[0] ;
Condition3 = o[1] > c[1] ;


if condition1 and condition3
then
Buy ( "Buy" ) 1 Shares next bar at market ;




-Ryan


Reply With Quote
 
(login for full post details)
  #12 (permalink)
ernmen
Fleming Island
 
 
Posts: 5 since Jul 2019
Thanks: 2 given, 0 received


greenroomhoo View Post
hey mike - i did what you said and figured out my logic issue. if anyone wants the code for trailing pivots i came up with i can post. many thanks

one quick follow up question - I am struggling with coding renkos as data2 for triggering entries and exits. my issue comes with data1 (regular minute bars) having many more bars than data2 (renkos). when there are no renkos in data2 - i get entries and exits on data1.

Im sure there is some boneheaded function i am missing. I tried using "barstatus <> = -1" but that only fixed some of my incorrect entries on data1.

What am i missing?

can you please share the final trailing pivots code. I am having isues figuring this out also...thanks!

Reply With Quote


futures io Trading Community Platforms and Indicators MultiCharts > Help with Easy Language Strategy with Renkos


Last Updated on March 12, 2021


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing

NEW BlackBird Features + FOREX Support w/Jeremy Tang @ SharkIndicators

Elite only
 

Our 12-year anniversary w/ $$,$$$ prizes (check soon)

June
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
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.
no new posts