ZigZagHighLow of ThinkSwim to EasyLanguage of TradeStation - futures io
futures io futures trading



ZigZagHighLow of ThinkSwim to EasyLanguage of TradeStation


Discussion in EasyLanguage Programming

Updated by vmodus
    1. trending_up 850 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 3 replies
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,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
 

ZigZagHighLow of ThinkSwim to EasyLanguage of TradeStation

(login for full post details)
  #1 (permalink)
Alpharetta
 
 
Posts: 3 since Jul 2020
Thanks: 0 given, 0 received

How to convert the following ThinkScript to EasyLanguage?

====
def EI = ZigZagHighLow("price h" = high, "price l" = low, "percentage reversal" = .01, "absolute reversal" = .05, "atr length" = 5, "atr reversal" = 2.0);
def EISave = if !IsNaN(EI) then EI else GetValue(EISave, 1);
def chg = (if EISave == high then high else low) - GetValue(EISave, 1);
def isUp = chg >= 0;
def EIL = if !IsNaN(EI) and !isUp then low else GetValue(EIL, 1);
def EIH = if !IsNaN(EI) and isUp then high else GetValue(EIH, 1);
def dir = if EIL != EIL[1] or low == EIL[1] and low == EISave then 1 else if EIH != EIH[1] or high == EIH[1] and high == EISave then -1 else dir[1] ;
def signal = if dir > 0 and low > EIL then if signal[1] <= 0 then 1 else signal[1] else if dir < 0 and high < EIH then if signal[1] >= 0 then -1 else signal[1] else signal[1];
plot upArrow = signal > 0 and signal[1] <= 0;
upArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
plot downArrow = signal < 0 and signal[1] >= 0;
downArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

===
The big problem is ZigZagHighLow, I guess. I see the code for EasyLanguage zigzag code here at traders.com/Documentation/FEEDbk_docs/2019/03/TradersTips.html

but, I cant put together. Any pointer would be highly appreciated.. Thanks!

Reply With Quote

Can you help answer these questions
from other members on futures io?
Metastock Xenith Adapter
NinjaTrader
Chatroom/Community of price action scalping/intraday ES traders?
Trading Reviews and Vendors
Help tracking down catalysts for the ES
Traders Hideout
DLL with webrequest function for MC
MultiCharts
IB Bracker Order
Platforms and Indicators
 
 
(login for full post details)
  #2 (permalink)
Legendary Market Wizard
Somewhere, Delawhere, USA
 
Experience: Intermediate
Platform: TradeStation,Sierra Chart
Broker: Tradestation Securities
Trading: My kids, VX, Eurodollar
 
vmodus's Avatar
 
Posts: 746 since Feb 2017
Thanks: 1,386 given, 1,356 received


trader929 View Post
How to convert the following ThinkScript to EasyLanguage?

====
def EI = ZigZagHighLow("price h" = high, "price l" = low, "percentage reversal" = .01, "absolute reversal" = .05, "atr length" = 5, "atr reversal" = 2.0);
def EISave = if !IsNaN(EI) then EI else GetValue(EISave, 1);
def chg = (if EISave == high then high else low) - GetValue(EISave, 1);
def isUp = chg >= 0;
def EIL = if !IsNaN(EI) and !isUp then low else GetValue(EIL, 1);
def EIH = if !IsNaN(EI) and isUp then high else GetValue(EIH, 1);
def dir = if EIL != EIL[1] or low == EIL[1] and low == EISave then 1 else if EIH != EIH[1] or high == EIH[1] and high == EISave then -1 else dir[1] ;
def signal = if dir > 0 and low > EIL then if signal[1] <= 0 then 1 else signal[1] else if dir < 0 and high < EIH then if signal[1] >= 0 then -1 else signal[1] else signal[1];
plot upArrow = signal > 0 and signal[1] <= 0;
upArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
plot downArrow = signal < 0 and signal[1] >= 0;
downArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

===
The big problem is ZigZagHighLow, I guess. I see the code for EasyLanguage zigzag code here at traders.com/Documentation/FEEDbk_docs/2019/03/TradersTips.html

but, I cant put together. Any pointer would be highly appreciated.. Thanks!

Are you asking the opposite? The EasyLanguage code is there. Do you want to convert to ThinkScript?

If so, this should be posted over in the ThinkScript section.

~vmodus

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #3 (permalink)
Alpharetta
 
 
Posts: 3 since Jul 2020
Thanks: 0 given, 0 received


Well, I see the zigzag code as posted in the previous URL, but I cant plug that into a strategy/indicator.. basically buy and sell points should be identified in zigzag code. Thanks!

Reply With Quote
 
(login for full post details)
  #4 (permalink)
Legendary Market Wizard
Somewhere, Delawhere, USA
 
Experience: Intermediate
Platform: TradeStation,Sierra Chart
Broker: Tradestation Securities
Trading: My kids, VX, Eurodollar
 
vmodus's Avatar
 
Posts: 746 since Feb 2017
Thanks: 1,386 given, 1,356 received


trader929 View Post
Well, I see the zigzag code as posted in the previous URL, but I cant plug that into a strategy/indicator.. basically buy and sell points should be identified in zigzag code. Thanks!

Okay, understood. I don't think you can write a strategy for zigzag, at least one that can be properly backtested. I looked at this last year for a little bit, but threw it away. When watching a live chart, you will see how the zigs and zags are formed.

Maybe someone else has a different perspective.

~vmodus

Visit my futures io Trade Journal Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > ZigZagHighLow of ThinkSwim to EasyLanguage of TradeStation


July 13, 2020


Upcoming Webinars and Events
     



Copyright © 2020 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, 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