saving code to excel but losing ";" semicolons.

mluttph

Member
I like to save my studies to excel, I have never had a problem until recently. Now when I paste them they are missing the semicolons at the end of the lines. Hope someone has a fix for this.
Thanks
 
I found that this macro probably caused this problem. It's in a backtesting spreadsheet.
Sub CvsFix()
'
' Enhance Macro
'
' Keyboard Shortcut: Ctrl+f
'
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=True, Comma:=False, Space:=False, Other:=False, OtherChar _
:=")", FieldInfo:=Array(1, 1), TrailingMinusNumbers:=True
End Sub
 
I found that this macro probably caused this problem. It's in a backtesting spreadsheet.
Sub CvsFix()
'
' Enhance Macro
'
' Keyboard Shortcut: Ctrl+f
'
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=True, Comma:=False, Space:=False, Other:=False, OtherChar _
:=")", FieldInfo:=Array(1, 1), TrailingMinusNumbers:=True
End Sub

why save studies in excel? do you manipulate the code lines with formulas or macros?

i save my code in text files. no extra formatting to worry about.
 
Yes and I use an excel spreadsheet to help me gage my strategy.

changing the actual code lines? not data?
i'm curious to learn more about what you are doing.

i have thought of using vba to interpret code lines and then generate something... maybe this winter i will get to it.
 
changing the actual code lines? not data?
i'm curious to learn more about what you are doing.

i have thought of using vba to interpret code lines and then generate something... maybe this winter i will get to it.
Conditional orders have length restrictions and do not allow multiple time frames. Strategies are not as restrictive. To make up for that I use excel to make my conditional orders. I mainly use it to concatenate the text string together.
 
Conditional orders have length restrictions and do not allow multiple time frames. Strategies are not as restrictive. To make up for that I use excel to make my conditional orders. I mainly use it to concatenate the text string together.
To work around the length restrictions in conditional orders: create the definitions for your conditional order within a study and then reference that study in your OCO.

There is no workaround for using multiple timeframes in a conditional order.
 
To work around the length restrictions in conditional orders: create the definitions for your conditional order within a study and then reference that study in your OCO.

There is no workaround for using multiple timeframes in a conditional order.
That sounds next level, not sure how to do it, but I think I would like to. My strategy has the definitions for my buy and sell orders, do I need to seperate the buy and sell into 2 different files?

I use 5min bars, but I like to compare to yesterdays levels in my study. Since I use yesterday's data I can insert the value into my conditional order and it will not change during the day. For example I may not want to sell if the price is above yesterdays mid point.
 
Last edited:
That sounds next level, not sure how to do it, but I think I would like to. My strategy has the definitions for my buy and sell orders, do I need to seperate the buy and sell into 2 different files?

I use 5min bars, but I like to compare to yesterdays levels in my study. Since I use yesterday's data I can insert the value into my conditional order and it will not change during the day. For example I may not want to sell if the price is above yesterdays mid point.
When plotting on a chart, it is best to have both buy and sell in the same study.
For conditional orders, it is better to have them separate.
 
Last edited:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
271 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top