NexusFi: Find Your Edge


Home Menu

 





Creating lower study


Discussion in ThinkOrSwim

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




 
Search this Thread

Creating lower study

  #1 (permalink)
xNICK
chattanooga
 
Posts: 10 since Dec 2018
Thanks Given: 0
Thanks Received: 0

Hey, can someone help me create a lower study that when the macd crossover makes a buy arrow the lower study is set to 1 and stay at 1 till the macd crossover shows a sell arrow which then set the lower study to 0 then holds at 0 till buy arrow and so on?

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Quantum physics & Trading dynamics
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
ZombieSqueeze
Platforms and Indicators
REcommedations for programming help
Sierra Chart
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
  #2 (permalink)
gwilson67
Chicago + USA
 
Posts: 2 since Jan 2019
Thanks Given: 0
Thanks Received: 0

Add as strategy and it will appear on your chart

input price = close;
input length = 20;

AddOrder(OrderType.BUY_AUTO, MACDTwoLines()."Value" crosses above MACDTwoLines()."Avg", open[-1], 100, Color.YELLOW, Color.YELLOW);
AddOrder(OrderType.SELL_AUTO, MACDTwoLines()."Value" crosses below MACDTwoLines()."Avg", open[-1], 100, Color.RED, Color.RED);


#declare lower
#plot MacDUp = if MACDTwoLines()."Value" crosses above MACDTwoLines()."Avg" then 1 #else 0;
#plot MacDDown = if MACDTwoLines()."Value" crosses below MACDTwoLines()."Avg" then 1 #else 0;
#MacDUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
#MacDUp.SetDefaultColor(color.GREEN);
#MacDDown.SetDefaultColor(color.RED);

Reply With Quote




Last Updated on January 9, 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