NexusFi: Find Your Edge


Home Menu

 





Need help on modify previous bar's value


Discussion in ThinkOrSwim

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




 
Search this Thread

Need help on modify previous bar's value

  #1 (permalink)
 joysync 
Toronto Canada
 
Experience: Intermediate
Platform: thinkorswim, NT
Trading: Emini ES NQ
Posts: 5 since Nov 2014
Thanks Given: 9
Thanks Received: 0

Question about how to modify previous bar’s value.

Program is for identify engulfing bar.

Def IsEngulfing;
If (high>high[1] and low >low[1] ) or (high<high[1] and low<low[1]) then IsEngulfing=0 else IsEngulfing =1;

But there is two kind of engulfing cases
Case one: Current bar is smaller then previous bar ( For example: high[1]=11 , low[1] = 9, high= 10 low =9.5) above program can handle this case.

Case two: Current bar is larger then previous bar ( For example: high[1]=10, low[1]=9.5 , high=11, low =9)
For this case I need change IsEngulfing[1] from 0 to 1 , But the I got error message.
Is there any way can do this kind of change. Thanks.

Started this thread Reply With Quote




Last Updated on May 29, 2017


© 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