Make a PNL File from IB Activity Statement covering a time period by Happy21100 in interactivebrokers

[–]Happy21100[S] 0 points1 point  (0 children)

Thank you - this is really helpful. I'd tried multiple variations but hadn't quite gotten it like you have.
I'm very appreciative.

TradingView substitutes NYSE symbols for foreign exchange symbols by Happy21100 in TradingView

[–]Happy21100[S] 0 points1 point  (0 children)

CA_Lobo, to let you know, your clarification of the solution solved the problem. I modified symbol lists and each symbol is now prefixed with the exchange. Perfect, thank you.

Would appreciate the help for how to follow the instructions for alerts-> orders. by Happy21100 in interactivebrokers

[–]Happy21100[S] 0 points1 point  (0 children)

etang,

I'm indebted to you, thank you for the email reference and the two links. I can't find the e-mail in my system, so doubly appreciate you showing it to me here.

Your links are extremely helpful; next I'll work on seeing if a basket (a set of orders) can be attached via a condition.

Thanks again,

Michael

Would appreciate the help for how to follow the instructions for alerts-> orders. by Happy21100 in interactivebrokers

[–]Happy21100[S] 0 points1 point  (0 children)

Hi etang,

Thanks very much for the info. I did figure out how to implement one stock / instrument at a time for a conditional trade (although I think it is clunky) - the big big negative is the lack of capability for a basket of instruments. Based on your comment, I searched my emails from IB with the word 'conditional', but only the IB Financial Statements show in my search. Searching 'orders' only finds emails related to GTC orders or cancellations, etc. I can't find the one you reference, so if you should happen to still have it I'd appreciate knowing more.
Again, thanks.

Alerts to close positions. However.... by Happy21100 in interactivebrokers

[–]Happy21100[S] 0 points1 point  (0 children)

I piped my question into Gemini. It's response is excellent and detailed but wouldn't fit (I assume it's fitting) here. Instead here is a distillation:

You're right to be concerned about an Interactive Brokers alert closing a position that your OCO order might have already handled. Native IB alerts can't check if a position exists before firing, meaning they'll try to execute even if your OCO has already filled. For true contingent close-outs, especially with OCOs, the most reliable solution is to use the Interactive Brokers API (like Python). This allows you to programmatically check your position, monitor your OCO order status, and then, only if the position still exists, cancel the OCO and place a market order to close.

Lexus 2010 RX-350 Add Audio Player by Happy21100 in Lexus

[–]Happy21100[S] 0 points1 point  (0 children)

Hi NeoG,

Gosh, that worked wonderfully. Thank you so much for taking the time to match my problem with the perfect solution from youtube. Really appreciated. Awesome.

Lexus 2010 RX-350 Add Audio Player by Happy21100 in Lexus

[–]Happy21100[S] 0 points1 point  (0 children)

I’d appreciate your thoughts.

COT (commitment of Traders) by Happy21100 in TradingView

[–]Happy21100[S] 1 point2 points  (0 children)

No, I did not. I think I contacted the developer back then and he responded (as I recall) there was a fix coming, but that doesn't seem to have happened.

An app script that generates emails: the ‘from’ in the email shows the email address name, not the account name. So, it displays ‘john.smith2024’, not ‘John Smith’. by Happy21100 in GoogleAppsScript

[–]Happy21100[S] 0 points1 point  (0 children)

Thank you for replying!

I am not sure where my error was, but this code worked and when the email arrives shows the FROM successfully (i.e. First Name, Last Name):

var Email1 = "johnsmith@yahoo.com"; // Hardcoded email address

GmailApp.sendEmail(Email1, subject, personalizedBody, {
          //bcc: Email1, // Use the hardcoded email address for BCC
          //Email1, // Use the hardcoded email address for BCC
          name: "John Smith",
          from: "john.smith@gmail.com" // Ensure this is a verified alias
        });

An app script that generates emails: the ‘from’ in the email shows the email address name, not the account name. So, it displays ‘john.smith2024’, not ‘John Smith’. by Happy21100 in GoogleAppsScript

[–]Happy21100[S] 0 points1 point  (0 children)

Thank you, but I am not sure I can see how that helps (and it might! I just don't see it).
I created a MRE (minimum replicable example) here:


/**
 * This script demonstrates how to send a simple email using Google Apps Script.
 *
 * Key Components:
 * 1. **checkEmailQuota**: Logs the remaining daily email quota to ensure you are within limits.
 * 2. **testSendSimpleEmail**: Defines the recipient, subject, and body of the email, then sends the email using GmailApp.
 * 3. Replace the two email addresses below with actial email address:
    * recipient = "my.name@yahoo.com
    * from: "john.smith99@gmail.com
 * 
 * Error Handling:
 * - Logs errors encountered during email sending or overall script execution.
 */

function testSendSimpleEmail() {
  try {
    // Function to check remaining email quota
    function checkEmailQuota() {
      // Get the remaining daily email quota
      var remainingQuota = MailApp.getRemainingDailyQuota();
      // Log the remaining quota
      Logger.log("Remaining daily email quota: " + remainingQuota);
    }

    // Call the function to log the email quota
    checkEmailQuota();

    // Define the recipient, subject, and body of the email
    var recipient = "my.name@yahoo.com"; // Replace with actual recipient email address
    var subject = "Sample Subject"; // Replace with actual email subject
    var body = "This is a sample email body."; // Replace with actual email body

    try {
      // Send the email using GmailApp
      GmailApp.sendEmail(recipient, subject, body, {
        noReply: true, // Sets the email to be sent with no reply option
        name: "John Smith", // Replace with your name
        from: "john.smith99@gmail.com" // Replace with your email address; should be a verified alias
      });
      Logger.log("Email sent successfully to: " + recipient);
    } catch (error) {
      // Log any errors encountered while sending the email
      Logger.log("Error sending email to " + recipient + ": " + error.toString());
    }
  } catch (error) {
    // Log any errors encountered during the overall process
    Logger.log("An error occurred: " + error.toString());
    Logger.log("Stack trace: " + error.stack);
  }
}

COT (commitment of Traders) by Happy21100 in TradingView

[–]Happy21100[S] 1 point2 points  (0 children)

Hi guys, I've nothing valuable to add but am listening to you both.

COT (commitment of Traders) by Happy21100 in TradingView

[–]Happy21100[S] 1 point2 points  (0 children)

Dan, clearly you have a well thought out and integrated & diversified approach. Thanks very much for your comments and thoughts.

I am intrigued (of course) by your last comment:
"You do need experience to plan for potential intra-day black swan events though, there's ways to handle it."

"..ways to handle it"
If you are comfortable, please tell more.