NexusFi: Find Your Edge


Home Menu

 





Create a function from Tops and Bottoms show me


Discussion in EasyLanguage Programming

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




 
Search this Thread
  #1 (permalink)
thinkorn00b
stavanger
 
Posts: 19 since Sep 2020
Thanks Given: 1
Thanks Received: 1

Hi

I want to use the built in "Tops and Bottoms" show me from Tradestation library in a strategy.
https://help.tradestation.com:443/10_00/eng/tradestationhelp/elanalysis/showme/tops_and_bottoms_showme_.htm


I want to make function of the show me study, so the strategy code is not that long. The function should return true when there is a candle closing above the highest pivot high (top patterns). On the next candle the function should return false, and then start to look for new pivot highs and so on. I think this would be the easiest way, to call it as a function instead of implementing the whole code into the existing strategy. Anyone know how I can do this?


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Kalshi Sets $4.13B All-Time Weekly Record as Polymarket …
Prediction Markets & Event Contracts
TradingView Deploys AI to Monitor SEC Filings in Real Ti …
TradingView
Hormuz Normalization Collapses to 19.5% -- Iran Regime F …
Prediction Markets & Event Contracts
Trump Truth Social Fires Hormuz From 10% to 59% -- Arsen …
Prediction Markets & Event Contracts
MyForexFunds Begins Returning Frozen Funds After CFTC Ca …
Funded Trading Evaluation Firms
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
196 thanks
Sober Journey With S&P
27 thanks
30 Sessions
20 thanks
Volume Indicators
8 thanks
BERN ALGOS algo trading journal
8 thanks
  #2 (permalink)
 Pickles1774 
Pembroke Pines
 
Experience: Beginner
Platform: NinjaTrader
Broker: Ninjatrader
Trading: Futures
Frequency: Daily
Duration: Minutes
Posts: 27 since Nov 2022
Thanks Given: 0
Thanks Received: 2

Hello thinkorn00b
To create a function that implements the logic of the "Tops and Bottoms" ShowMe study in Tradestation, you can follow these steps:
Define the function, let's call it checkTopPattern(), which takes the necessary parameters such as the price data and the required settings for the ShowMe study.
Inside the function, implement the logic to identify top patterns based on the input settings. This includes tracking the pivot highs and checking if the current candle closes above the highest pivot high.
Keep track of the state of the function using a boolean variable, let's call it patternDetected. Initialize it to false at the start.
Iterate through the price data, candle by candle. For each candle, check if it meets the conditions to be considered a top pattern. If it does, set patternDetected to true.
Once a top pattern is detected and patternDetected is true, the function should return true for that candle.
On the next candle, reset patternDetected back to false to start looking for new pivot highs.
You can call this checkTopPattern() function from your existing strategy code whenever you need to check for the presence of a top pattern. If the function returns True, it means a top pattern has been detected based on the input settings. Hope this help a little.


Follow me on X Visit my NexusFi Trade Journal Reply With Quote




Last Updated on January 20, 2024


© 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