Putting things together

Live looks good and will be in full trade mode soon. Another Oanda API note:
The “environment” for the API itself is defaulted to practice, which is fine (and preferable even) but they sure don’t make it obvious to new coders how one goes about switching the environment from demo to live. Once you switch the API token itself and the account token, it will happily give you an authorization error.

“errorMessage”:“Insufficient authorization to perform request.”

Their documentation for trouble shooting?

1.The URL provided to the curl command is correct. Click here to learn how to configure curl examples that can be copied without further modification.
2.The authentication token is valid and has been added as a Bearer token in the HTTP Authorization header.

It’s easy to get lost here as they don’t provide any good examples of how one actually configures curl, or uses the url in their API call. The answer of course, is quite simple.

Practice code: api = oandapyV20.API(access_token=practice_access_token)
Live code: api = oandapyV20.API(environment = ‘live’,access_token=live_access_token)
the acess token of course being the one they generate for you for your specific account (xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)

That’s it! just an additional parameter in the API call from nothing (default) to environment = ‘live’. No need to curl yourself, no need to ping some url and attach the key yourself, just a switch to turn on.

Heading into the next full week of trading next week (excited) and continuing to work on debugging.

1 Like

My stuff isn’t as pretty as sendex’s, but it works for me! Maybe one day hehe.
One of the things that took me a little learn in research is that there’s so much that goes on behind the scenes. The stuff we see in the forums is really just the end product and off-time, as opposed to the meat of it.

The finished product really took a lot of hours, and what I really wanted was just price with some Bollinger bands and a marker on the chart! The advantage, of course, is that now I can more or less query any set of bars that I want that I have access to - no need to spend minutes scrolling only to come up with a new idea and scroll again the other way to check. I can more or less instantly generate, screen cap, and edit on demand. My approach is to keep the window as small as is reasonable. I want to be able to identify consolidation areas and then trade a breakout. Defining those two are worth years of work.

The power of programming :slight_smile:


It can take hours and hours to get it to run right, but when you do it’s all worth it. More specs, better readability, easier to tweak.

The theme of this post is that it’s really important to understand your trading personality and the types of trading decisions you’re comfortable making.
Trading is always a balance between risk, reward, and probability. with 1:1 risk: reward, I need at least 50% win rate. with 3:1 risk: reward, I need to win at least 75% of the time. The edge is how much better than the minimum win rate required I can perform. Now most people prefer something like trading 1:3, so you only need 25% or better, and I’ve always preferred the other end, and I’ve only recently been able to specify why. The reason is when I win a lot more, I can create more opportunities within those trades to further increase success. Think about it this way: out of 100 trades, if I win 75 and the other guy is winning 25 but we have the same ending balance, it’s moot. But if we can both manage to squeeze out an extra 5 pips out of half the winners, I come out much more ahead. The other guy can try to cut his 75 losers by 5 pips, but as a mostly mechanical trader, it’s hard to find those kinds of opportunities.
-It’s easier to squeeze out pips when the targets are bigger (25, 40, 60 as opposed to 5, 10, 15)
-Having larger targets mean you spend more time in trades (100, 120, 150) which I don’t like doing)
Because I’m basically guaranteed to spend some portion of my trade in the negative, it’s easy to scale in some part of the trade at the lower parts. By “averaging down” it’s improving my RR while theoretically not changing my win rate.
-In trying to get 50 pips in a bull move, it’s easier to try to get 1 move of 20 and 1 move of 30, than it is to get 1 move of 50.

It’s because I’m a mechanical trader. It’s because I don’t like spending a lot of time in trades. It’s because it’s easier for me to see if averaging down is actually affecting my wr. It’s because I can find it easier to get 2 small moves as opposed to 1 big move. Your edge is your decision-making ability. You have to find what works for you.

Watching charts tick is probably one of the most enjoyable things for me, but also probably one of the least productive hah.


Entered a decision point on eur/usd when price came back to the 30% retracement. Overall trend here is clearly down, and the spike up is strong and short. My thought process is that bears should feel comfortable loading in this area and bulls might need some more fuel to push higher. Both of these lead me to think that even if we are going to break 1.1250 going up, our current fuel is not enough. We should see a deeper retracement, at least closer to the 50% at 1.1125-30 than at it’s current levels.

I think we’ll break south of the yellow box before north of the blue box. Feeling healthy 60% on this one.

update: Wrong prediction. EU in a lot of chop.

The question now is, which will be first, 1.13 or 1.11? Price is pretty solidly at 1.12 flat, my bet is 1.11 first

It always feels good to develop some model or system and have it work out on the first go-around. It’s also a great way to become disillusioned if you don’t accurately track the future :wink:
After I made the call for 1.11 before 1.13, the chart played out pretty flawlessly.

I didn’t trade the m30 here, just using it as a way to get the chart to fill the space between entry and exit and have some info to play around with. Most people agree that you should use the higher time frame to guide direction, and the smaller time frame to fine-tune. Great. I used the HTF to determine where the max tp/sl should be. The question then becomes how do you enter?

Something that I’ve implemented in my style of trading that I think is critical is that I don’t use the same entry system in the LTF that I do in the HTF. So while I might be using trend lines in the LTF, I’m not using it to initially determine a target in the HTF. The second part is that even in the context of the LTF, I’m not using most of the entry systems as entry systems. They’re used as confirmation points. So in the example of the trend line break (1), I’m not using the break to enter, I’m using it to gauge if there is enough supply/demand at that level to break it down. In (2) there’s some SR and a little head and shoulders pattern, and (3) is a simple trend line break. My problems originally using these systems were that they were incredibly difficult to measure in terms of actual entry, as well as R:R and everything was “hindsight 20-20”. But now I use that hindsight as an indicator that the trade is going my way.

This has been a breakthrough because of the following hypothetical. Let’s say I used HTF to determine that direction should be bearish. If I take the trend line break as my first short trade, and I want that traditional “good” R:R ratio, it’s possible that I would have been stopped out in the creation of the H&S pattern later. If my long term direction is short, it makes no sense to exit in the first hour and a half of the break. The break is super clean and fast, and I would have immediately trailed the stop or moved the stop to BE.
Trade 1: null
Then the next 2 entry points probably play out okay, given that the stop is sufficiently far enough (which is decreasing the reward:risk ratio now).
Trade 2/3: 1-2 winners
In the next trade, the breakout is great but since it’s a momentum play, the RR isn’t great here.
Trade 4: 1 winner with meh R:R (half a winner)

In this scenario, given that I even had the foresight to know that I would have 4 cracks at this, I would have ended up with anywhere between 1.5-2.5 solid trades. Similar versions of this very hypothetical have happened to me too many times, so I had to work on a new method to deal with it.


Different strategies for different scenarios. Based on a simple weekly view, I’m expecting a wick for Friday so price should rise at least a little. For slightly bigger context it’s been taking a hammering for a while so I’m expecting a little break. Short term bull mark would be 1.1078. Following up from the previous post we’ve most recently passed 1.11, so the question is 1.12 vs 1.10. I’m slightly leaning on 1.12 actually but will need to see buying strength soon.

Strength never came around, basically straight down to the low and now rebounding. At these new levels I think there’s a small opportunity for a long.

Current price is 1.103x. Trading for 1.11 with max SL of 1.09.


Update on this one. Hit the TP here, though took a bit longer than I was originally projecting. The best possible RR here would have been up to ~1:5 which is fairly unlikely. There are a lot of possible stop loss areas that would have wiped the position when viewed from a smaller time frame, which is why the context of where the trade is originally taken matters. I used to be quite convinced that the correct idea of trading is to use the higher time frame to set the direction, and then the smaller time frame is set TP/SL, but I’m not so sure on that these days.

A trader I respect once said that good trading is boring. While I don’t know if I’d go that far (making money isn’t boring yet!) it can be less dramatic when done in certain ways. If you pick a very consistent strategy, you miss out on the home runs in lieu of base hits. Sure you can tailor your strategy to allow for them, but fiddling with them can be tricky. 3% a month is 40% a year, or double the balance in 2 years. With the correct R:R and a slow ramp up at even 0.25% additional risk at 6 month intervals, that 2x can grow to as much as 5x. Slow and steady. Find the strategy first, then learn to maximize it.

As for immediately trading, If eur/usd can break 1.10 early next week i think we’ll end up back at 1.11 soon.

1 Like

Dear journal,
I think I found my system. September was my first real trial month. There are a few minor things to address that I haven’t found the time to properly find a solution for, but it is not an obstacle that prevents me from trading. I ended ~130 trades about +3%, which is slightly better but not significantly better than target. Everything that I have learned, all the tidbits I gathered, culminating into the most consistent system across time, volume, and gain. There is definitely something there. There are only a few parts left. Time - to check if the system will continue to work. Optimization - to take the few things I have noticed to continue to tweak and make the system better. And sharing - to take and pass on information to those who can use it.

Everything in due time - the process exists for a reason. Presently, there is a difference between patience and waiting. Updates to come in month 6, month 12, and month 18. Phase 1 is just beginning.

Trail month - +3

Still alive!
September: +3.33%
October: -1.18%
November: +.59%
December: +0.22%
January: +4.38%
February:+7.06%
March: Pending, but more or less 8.5%
Net total: ~14%

They always say you should always have specific goals, and I’ve planned mine out. I’m officially in phase 1 of my 3 part plan. Completing phase 1 for me would be 1 full year of no months with more loss than I made in my most profitable month (so currently 8.5%) and a total of 20% gain. My stretch goal is 30%, but at this point I consider it more or less random and don’t have any influence on the outcome - the trades do what they will and I’m just along for the ride. Phase 2 would be a net of +10k in profits, with a minimum of 2 years trading (realistically 3). Phase 3 is my initial final goal which would be +50k in profits, with a minimum of 5 years trading and no more than 15 losing months (averaging 3 losing months a year).

It’s too early to start celebrating victory, but almost time to start celebrating non-defeat. It’s something really only traders understand. I have just 2 points to touch on before it’s back to the lab for me.

  1. (personal/psychology/mental/advice related). I used to be a little upset when people would tell me that I would never make it. I distinctly remember chatting with someone who ultimately wanted to sell me access to a website, which, in hindsight, was really some sort of multiple time frame fib system to try and detect support/resistance areas. He gave me demo access for a while, but I didn’t really have time to trade due to working part time jobs and other things like sleeping, gaming etc. When my demo was up he asked if I wanted to buy and I declined and explained why (partly because I was just so darn broke). He got frustrated and told me that eventually I’d cobble together some money and blow my account and quit. He was partially right - I did blow the account. But I always remembered him and all the people who said I wouldn’t find anything that worked. Again, I’m not celebrating yet, because the lesson is that I can’t really be mad at him. After all, I’m just like him now: I play the probabilities and the probabilities say that most people don’t make it. He knew that back then and I didn’t. To be honest, he might not even be profitable. There were a lot of people up and down over the years who never called it quits until year 5,7 or more, and many of them not even going out by huge sums. They got off relatively unscathed, which I consider a success. There’s a very teeny tiny portion of traders who are “just okay” at trading. I would say 99%+ are either successful or not. You can be “just okay” or “decent” at a lot of things: sports, chess, poker, games, etc. but in trading you either win or you lose. It’s worth thinking about.

  2. (TA related) The approach to finding an edge is similar to how we approach hard sciences. We make an observation, analyze it, and then try to break it apart. In my realm, I approach it a lot like particle physics. Just follow for a bit I promise I’m not crazy. In physics, we start be trying to break everything into smaller pieces, and each of those pieces into smaller ones. Some visible object leads to little pieces, atoms, sub atomic, etc. In trading, the most common result for a random strategy is that R:R * Probability = 50%. A 1:1 system that wins 50% is break even. A system that is 1:2 with a 33% probability is breakeven. An edge comes from “breaking” that structure. There are many options. You can win 60% with 1:1, or you can win 40% with 1:2, or endless other options. The second part is that price structures can also behave this way. If you can find a way to break it apart while maintaining the whole, you just might find an edge. An indicator for long bias when price is above the MA might be break even. But what if you break it out by time duration? By the time of day or day of week? By the nearest round number that is next to it? By a range of candle patterns that occur before it? It’s a really cool process that has led me to insights. Not always actionable, but it never hurts to have more tools; You never know when you might have a use for them. I’d share one of these examples, but that will have to wait until I hit my goals.

April: -1.67%
May: +5.71%
June: +1.84%
Phase 1 is still on track to complete and is only 1.5 months away! I previously stated phase 2 would take 2 years, but it’s probably going to take 5 or more. My account is tiny and I don’t plan on funding it aggressively. With the current record of gains it would take roughly 4-5 years, but honestly I don’t feel that comfortable projecting out more than 6 months at a time. As far as this system is concerned, I actually don’t have many ideas for improvement - It’s not stellar in terms of performance but it’s fairly low maintenance and more importantly, fairly consistent. Development time is spent on my second system, which will need to go through it’s own demo->testing->trading pipeline.
As for wisdom for the public, here are 2 things I’ve realized in the past couple of month since my last post:

  1. Once (or perhaps because) a system is fully mechanical, the rules for traditional risk per trade go out the window. Some systems may go beyond the 1% or 2% per account. Risk per trade offers a huge opportunity for optimization, and the same system that was averaging 10% a year can easily start averaging 20% or more. A fully mechanical system leaves no room for special circumstances or exceptions, and thus can be treated identically and scaled accordingly. Further, backtesting is very important in this area because it defines the bounds of what is “optimal”. Increasing risk has a sort of bell curve effect, where pushing risk too far, even on a winning system, will cause it start losing.
  2. Once a system is made, there are many avenues to try and explore optimization. Oanda actually offers some nice tools to do this, and I’ll show some examples from my own account.
    If the system is relatively short term, and by that I mean it’s resolution time is <1 day, than time of day is quite important. Actually, I think the following is a really good rule of thumb: If your system is driven purely by price, then time leaves a great area for optimization. That is, my system doesn’t think about time when considering entry or exit, but it should be used to further filter my trades.

    There are no weaknesses shown here because I’ve already considered time of day when implementing my system. Keep in mind though, which type of metric may be trying to tell you info, versus what may be by system design and potential luck.

    My full performance says that 0:00-8:00 leads to losing trades, but didn’t I just already optimize for it? I’m not sure here but I’m happy to wait for this to gather more data. Trading USD/JPY is a similar story. What’s not shown is that I trade EUR/USD as well, so in terms of innate currency movements or volatility, there’s no reason why I should choose to cut USD/JPY out of my portfolio (and likewise, this is not a reason to increase risk in EUR/JPY).

Trade duration is potentially helpful for more discretionary traders, but it’s clear as day why my losing trades are shorter - my TP is greater than my SL and therefore even in a completely random environment my trades will always be shorter when I’m wrong, and it would be a terrible idea to try to extend my trade duration under the assumption that the longer I hold it, the more profitable I’ll be.

Getting near the end now, ‘Fast re-entry’ has to be a strength because it’s by design (aka that’s why the system works in the first place).

Lastly, it says that Tuesdays are a bad day to trade, and Mondays are good. Now, I might actually consider it because I haven’t before, but my viewpoint is this: I’m not comfortable making a decision on this until I can think of a reason why Tuesdays are bad. I’ve done some research into the weekly structure so this actually makes some sense, but I don’t want to just “patch” something (don’t trade Tuesdays) if I can find a more organic way to address the issue. I might try to find some way to take overall price structure into account, which could solve the Tuesday weakness and improve metrics across the board. In other words, making any decision based on these insights is treating the symptom, not the disease. However, it can still be a valuable tool.

Probably won’t have many updates until 3-6 months from now, see you then journal :slight_smile:

1 Like