Programming a stop sale

Discussion in 'Programming' started by jmm07e, Aug 6, 2019.

  1. jmm07e


    Hello, I am completely new to programming. The only programming I've ever done is "hello world" in excel.

    I want to write a program to raise my stops sell orders. I run a 90% rule for my equities. I only raise my stop sells. Never lower them. I keep it at 90% of market.

    Can someone help me write this?
  2. RedDuke


    No need to writer something this simple. Just look into software like NinjaTrader, you can customize it there. Look at their tutorials. Software is amazing and free, until you need to trade live (very cheap when live).
    Overnight likes this.
  3. jmm07e


    Nice thanks for the advice. I really appreciate it.
  4. Turveyd


    What Platform ??

    Wrote my own on MT4, sits on my PC and any trade placed ie tablet away from home, instantly adds and tracks with SL.
  5. jmm07e


    Interactive brokers I think has a trailing stop order
  6. kmiklas


    Depending on your broker/software, you may have the option to put your stop order onto the book. I don't like doing that; I prefer to monitor prices on my side. If I want to stop out at 90% I would actually issue market sell (or cover) when a price target is breached.

    A stop becomes a market order anyway when the price limit is reached.

    Never let 'em know your next move. :sneaky:

    Note that you usually won't get your actual stop price. It's often at 89%, 85% or even lower, depending on how fast things are plunging.
    TommyR likes this.
  7. jmm07e


    Understood. I worked at Merrill under an advisor that used 90% trailing stops, but we had to do it manually everyday in all of the clients accounts. Ridiculous I know.

    If we know that a lot of people keep their stops at 90%, would it make sense to put them at 89% or even 85%? It seems like that's a bit more risk. But the idea is that we won't get stopped out and then the prices should rise again, giving them a little more "wiggle room".

    Also, I've got hundreds of positions. I can't monitor everyday. That's what I'm doing now, but it's way too time consuming. It is an everyday, incredibly manual process. It would be a much better use of time to use an automated broker trailing stop.
  8. RedDuke


    Than software like Ninja is exactly what you need.
  9. jmm07e


    Yeah I contacted Ninja. They're great. Then I dug a little deeper and interactive brokers has a trailing stop sell order. So really there's no need. Just go straight through interactive brokers.

    That's my understanding, I could be wrong.
  10. kmiklas


    I wrote a C++ monitoring program. It subscribes to MD for my instruments. If a price is breached it takes action. Basically an algorithmic stop.

    Also, beware the stop sweeps. When there are a lot of stops on the book near the spread, some brokers will quickly move the price, gather the commissions, and then move it right back with a couple quick orders.
    #10     Aug 28, 2019