NexusFi: Find Your Edge


Home Menu

 





PC-SPAN


Discussion in Options

Updated
      Top Posters
    1. looks_one Dudetooth with 218 posts (213 thanks)
    2. looks_two ron99 with 116 posts (55 thanks)
    3. looks_3 CafeGrande with 30 posts (4 thanks)
    4. looks_4 BlueRoo with 24 posts (5 thanks)
      Best Posters
    1. looks_one Dudetooth with 1 thanks per post
    2. looks_two SMCJB with 1 thanks per post
    3. looks_3 ron99 with 0.5 thanks per post
    4. looks_4 BlueRoo with 0.2 thanks per post
    1. trending_up 188,781 views
    2. thumb_up 317 thanks given
    3. group 75 followers
    1. forum 610 posts
    2. attach_file 159 attachments




 
Search this Thread

PC-SPAN

  #591 (permalink)
 Dudetooth 
Steubenville Ohio
 
Experience: Intermediate
Platform: OX, OEC, RJO
Trading: Options on Futures
Posts: 266 since Sep 2012
Thanks Given: 30
Thanks Received: 274


Kevalo View Post
@Dudetooth

First let me thank you for your great work on PC SPAN. It helped me a lot.

I changed the code as shown in your image above in an Excel 2016 64-bit Version. Unfortunately there is still the same "compile error: type mismatch" highlighting the expression „URLDownloadToFileA“.

Edit:
There is no problem running it on Excel 2016 32-bit.


@Kevalo,


Could you try editing the code as shown in this image and see if it works for the 64-bit?

Thanks



Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Exit Strategy
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
38 thanks
NexusFi site changelog and issues/problem reporting
27 thanks
GFIs1 1 DAX trade per day journal
19 thanks
The Program
18 thanks
  #592 (permalink)
 Kevalo 
Germany
 
Experience: Advanced
Platform: AgenaTrader, TWS
Broker: IB, Saxo
Trading: Stocks, Options
Posts: 12 since Feb 2011
Thanks Given: 63
Thanks Received: 3

@Dudetooth

I have changed the code in the 64-bit Version as shown in your image.

There is still a compilation error. This time It says „Sub or Function not defined“, again highlighting the expression "URLDownloadToFileA" as shown:
Private Function SaveWebFile(URL As String, LocalFilename As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFileA(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then SaveWebFile = True
End Function
BTW, how can I insert an image between the text lines? Copy and paste didn't work. And the import image function requires a URL.

Reply With Quote
  #593 (permalink)
 Dudetooth 
Steubenville Ohio
 
Experience: Intermediate
Platform: OX, OEC, RJO
Trading: Options on Futures
Posts: 266 since Sep 2012
Thanks Given: 30
Thanks Received: 274



Kevalo View Post
@Dudetooth

I have changed the code in the 64-bit Version as shown in your image.

There is still a compilation error. This time It says „Sub or Function not defined“, again highlighting the expression "URLDownloadToFileA" as shown:
Private Function SaveWebFile(URL As String, LocalFilename As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFileA(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then SaveWebFile = True
End Function
BTW, how can I insert an image between the text lines? Copy and paste didn't work. And the import image function requires a URL.

@Kevalo,

If you don't mind trying, add an "A" to Private Declare PtrSafe Function URLDownloadToFile so it reads Private Declare PtrSafe Function URLDownloadToFileA … that last error might be a simple fix.




For the images, when you go to respond, click on the attach file:


Browse for the image to upload. Once you click Upload and it is complete you can select Embed … wherever your cursor is in the message it will insert the image:


You can move the html line "[IMG]https://nexusfi.com/attachment.php?attachmentid=*****[/IMG]" to wherever you'd like the image to appear in your response.


Reply With Quote
Thanked by:
  #594 (permalink)
 Kevalo 
Germany
 
Experience: Advanced
Platform: AgenaTrader, TWS
Broker: IB, Saxo
Trading: Stocks, Options
Posts: 12 since Feb 2011
Thanks Given: 63
Thanks Received: 3


Dudetooth View Post
@Kevalo,

If you don't mind trying, add an "A" to Private Declare PtrSafe Function URLDownloadToFile so it reads Private Declare PtrSafe Function URLDownloadToFileA … that last error might be a simple fix.

@Dudetooth

No, I certainly don’t mind. I am very grateful to you and also @ron99 for your outstanding work here and your willingness to help with the 64-bit problem. I wished I could give back more but I am no programmer (not even close). Thank you also for your info about importing images.

I added an „A“ to URLDownloadToFile. The code in my Excel now looks as shown below:




Now there is again the old type mismatch compilation error (My Excel is the German version. The error message translates to „type mismatch“)


Reply With Quote
Thanked by:
  #595 (permalink)
 Dudetooth 
Steubenville Ohio
 
Experience: Intermediate
Platform: OX, OEC, RJO
Trading: Options on Futures
Posts: 266 since Sep 2012
Thanks Given: 30
Thanks Received: 274


Kevalo View Post
No, I certainly don’t mind …
Now there is again the old type mismatch compilation error (My Excel is the German version. The error message translates to „type mismatch“)

@Kevalo,

Let's try this … about half-way through the Download module, find the function SaveWebFile and move it up just under the Option Explicit section and make the following changes:



Then let's see if it works.

Thanks.

Reply With Quote
Thanked by:
  #596 (permalink)
 Kevalo 
Germany
 
Experience: Advanced
Platform: AgenaTrader, TWS
Broker: IB, Saxo
Trading: Stocks, Options
Posts: 12 since Feb 2011
Thanks Given: 63
Thanks Received: 3


Dudetooth View Post
@Kevalo,

Let's try this … about half-way through the Download module, find the function SaveWebFile and move it up just under the Option Explicit section and make the following changes:



Then let's see if it works.

Thanks.

@Dudetooth

No more compilation errors with those changes! However, no risk files can be downloaded. After starting the download the normal message „Saving … risk files“ changes to „Unable to download risk files from server“ after a few seconds.

I already checked my parameter settings and tried various dates. No download possible. The risk files can be downloaded on my wife’s system, on which a 32-bit version of Excel is installed, so there is no problem at CME.

Thanks!

Reply With Quote
Thanked by:
  #597 (permalink)
 Dudetooth 
Steubenville Ohio
 
Experience: Intermediate
Platform: OX, OEC, RJO
Trading: Options on Futures
Posts: 266 since Sep 2012
Thanks Given: 30
Thanks Received: 274


Kevalo View Post
@Dudetooth

No more compilation errors with those changes! However, no risk files can be downloaded. After starting the download the normal message „Saving … risk files“ changes to „Unable to download risk files from server“ after a few seconds.

I already checked my parameter settings and tried various dates. No download possible. The risk files can be downloaded on my wife’s system, on which a 32-bit version of Excel is installed, so there is no problem at CME.

Thanks!

@Kevalo,

One last thing I can think of … let's drop the check of the 64-bit version on your machine. This is exactly how it is shown on Excel Forum ( URLDownloadToFile (API + 64 bit version) [SOLVED]) and then you would need to make a small change to the function SaveWebFile (drop A so it reads URLDownloadToFile).


If this doesn't work, I'm really at a loss.

Reply With Quote
Thanked by:
  #598 (permalink)
 Kevalo 
Germany
 
Experience: Advanced
Platform: AgenaTrader, TWS
Broker: IB, Saxo
Trading: Stocks, Options
Posts: 12 since Feb 2011
Thanks Given: 63
Thanks Received: 3

@Dudetooth

Thanks, Dudetooth, but I cannot find any info on how to drop the 64-bit check in your link. The moderator posted the code for the 64-bit conversion of the URLDownloadToFile Function, that was already included in your last changes. Have I overlooked something?

Reply With Quote
  #599 (permalink)
 Dudetooth 
Steubenville Ohio
 
Experience: Intermediate
Platform: OX, OEC, RJO
Trading: Options on Futures
Posts: 266 since Sep 2012
Thanks Given: 30
Thanks Received: 274


Kevalo View Post
@Dudetooth

Thanks, Dudetooth, but I cannot find any info on how to drop the 64-bit check in your link. The moderator posted the code for the 64-bit conversion of the URLDownloadToFile Function, that was already included in your last changes. Have I overlooked something?

@Kevalo,

That link was just to the forum where someone had posted the solution to getting URLDownloadToFile working on a 64-bit version of Excel so you could see how they posted the solution.

The screenshot I included was showing proposed change to the code at the top of the Download module … if you change the code from looking like the pic in post #595 to the pic in post #597 you will remove the 64-bit check.

Reply With Quote
  #600 (permalink)
 Kevalo 
Germany
 
Experience: Advanced
Platform: AgenaTrader, TWS
Broker: IB, Saxo
Trading: Stocks, Options
Posts: 12 since Feb 2011
Thanks Given: 63
Thanks Received: 3



Dudetooth View Post
@Kevalo,

That link was just to the forum where someone had posted the solution to getting URLDownloadToFile working on a 64-bit version of Excel so you could see how they posted the solution.

The screenshot I included was showing proposed change to the code at the top of the Download module … if you change the code from looking like the pic in post #595 to the pic in post #597 you will remove the 64-bit check.

@Dudetooth

OK, got it. Was a misunderstanding on my side.

I changed the code accordingly but now there is a new compilation error because the variable "lngRetVal" is not defined.
How and where can it be defined? I think it should be working after that definition.

Thanks again!


Reply With Quote




Last Updated on September 23, 2021


© 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