NexusFi: Find Your Edge


Home Menu

 



Categories Help    






 
AskTheChart 4 *
v0.1.05
Introduction:
AskTheChart is an experimental AI-powered indicator that showcases the use of a large language model to enhance trading strategies and analysis using agents. Traders can interact with their charts by asking questions such as, 'What is the current trend?' They can give commands like 'Draw horizontal line at the $1500 level,' or instruct the agent to highlight an area on the chart. It's important to note that this is experimental and intended to complement, not replace, traditional trading analysis and strategies. Its main purpose is to demonstrate the potential applications of AI in trading.

How to Use:
AskTheChart adds an interactive button 🤖 on the chart toolbar. When clicked, it opens a chat window where you can ask questions or give commands. The AI agent understands your queries and responds accordingly. To configure the indicator, go to the indicator settings and enter the required OpenAI/Azure URL, API key, and Model. You can also set the maximum number of bars allowed for the agent context window.

URL example:
 
Code
OpenAI: https://api.openai.com/v1/chat/completions
Azure OpenAI: https://{name}-east-2.openai.azure.com/openai/deployments/gpt-4/chat/completions?api-version=2023-07-01-preview
We utilize ChatGPT functions for tool-switching, requiring the use of one of these Models.
gpt-3.5-turbo-0613
gpt-4-0613

 
Code
0) Indicator settings
URL: https://api.openai.com/v1/chat/completions
API Key: Your OpenAI API key
Model: gpt-4-0613
If you are using Azure OpenAI, the model's name should match the one defined in your deployment, and the required model version is 0613
gpt-4
gpt-3.5-turbo

 
Code
0) Indicator settings
URL: https://{name}-east-2.openai.azure.com/openai/deployments/gpt-4/chat/completions?api-version=2023-07-01-preview
API Key: Your OpenAI API key
Model: gpt-4
Cost Implications:
Please note that using AskTheChart involves making requests to the OpenAI API. These requests are subject to OpenAI's pricing structure, which means that usage of AskTheChart may incur costs. Users are responsible for these costs and should review OpenAI's pricing details before using this indicator.

Challenges:
There are numerous tools and libraries available for developing with LLMs. However, integrating them into NinjaScript without relying on DLLs is a significant challenge. NinjaScript employs C# 5.0, which is considered somewhat legacy and lacks many modern features. While it's possible to work around this limitation using compiled assemblies, I opted for an open-source approach to maintain accessibility.

Change Log:
NT8 AskTheChart by pixel @ nexusfi.com, Version 0.1.0, released 10/19/2023 NT8 8.1.1.7 64-bit
10/22/2023 v0.1.01 - Fix: model variable missing
10/22/2023 v0.1.02 - Removed duplicate declarations
11/14/2023 v0.1.03 - Removed delay for faster function calling
11/14/2023 v0.1.04 - Fix: error when using dynamic type
11/20/2023 v0.1.05 - Style: show api response errors in the chat

I'm eager to discover additional applications for LLMs in trading and explore their use in my own strategies, as well as in others. You can find the discussion here.





Category NinjaTrader 8 Indicators and More 
 
Suggest other entries I might like
Details: AskTheChart
Category: NinjaTrader 8 Indicators and More 


October 20th, 2023
Size: 20.09 KB
Downloaded: 443 times
Comments/ratings
5 * DavidHP October 20th, 2023 08:22 PM
Very kewl
5 * agalindoc October 21st, 2023 09:32 AM
Awesome!
5 * Darvish October 21st, 2023 09:33 AM
This is a very inpressive use to ChatGPT.

Question, does this send anything back to you?
5 * CptCurmudgeon October 21st, 2023 12:36 PM
Excellent.
4 * Rexsole1 October 21st, 2023 05:30 PM
I have little experience with AI but want to learn. Thanks for putting this together. I am getting an error message when I enter in a command. The message is Unable to process your request. Using OpenAI with the url: https://platform.openai.com. Added in the key code and the model I think I am using is gpt-3.5-turbo-0613. Watched your video. Everything seems pretty straightforward but I am sure the problem is me. Any suggestions would be appreciated.

thanks

Brian
5 * Madness October 24th, 2023 04:45 PM
Thank you!
5 * confido75 October 27th, 2023 10:46 AM
Followed the instructions but keep getting an error stating unable to process. I have used APIs for ChatGPT4, so I am not sure what the issue is. I do love the work you have done here. This is what I was hoping someone would share.
2 * Icarus1 October 31st, 2023 09:10 PM
Failed to import.
5 * Realtimetrader November 30th, 2023 04:15 PM
Thanks
3 * minicantrade December 9th, 2023 09:07 AM
Downloaded the indicator joined Azure api --and the indie doesnt even show up on my list so I am a little lost and have no idea what I am doing some help would be good LOL thanks

 
Sort by

 




© 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