NexusFi: Find Your Edge


Home Menu

 





Creating lower study


Discussion in ThinkOrSwim

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




 
Search this Thread
  #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?
Warsh Opens Today, Hormuz June 19 -- WTI Below $80, Fran …
Prediction Markets & Event Contracts
Iran Forward Curve: June 30 at 56% vs June 15 at 28% -- …
Prediction Markets & Event Contracts
Rubios Good News Within Hours and the 30-Day Math: Why H …
Prediction Markets & Event Contracts
S&P 500 Holds the Line: No Fast Track for SpaceX, Op …
Stocks and ETFs
Six Days to Kickoff: World Cup Prediction Markets Hit $1 …
Prediction Markets & Event Contracts
 
  #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


© 2026 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 - Downloads - Top
no new posts