MQ4 Code Works

hayseed

Master Trader
Jul 27, 2010
815
200
109
usa
I rewatched about old video about exporting to Excel. I remember you staid that you wanted to see if you could just buy and sell every candle, and it didn’t work out.
I’m curious if you found anything else out… l
//----

that had to do with my belief that the best system could buy, sell or both buy and sell on the exact same signal and make money..... from 5 years ago..... one day i hope to have time to chase that rabbit again.....
//


before i forget, and as i'm watching the eurusd turn against me, this is what i meant about selling the lower timeframes zigzag up legs in a larger timeframe downtrend..... chart below..... yellow checks at qqe signals that did not work well.....

this works best when you catch the weekly trend changes...... so, now is not a good time to attempt this with the eurusd...... 15 weeks ago was..... and more importantly when the entire currency group changes.....

so the idea is once the daily and weekly begin to fall, they must each have a zigzag up leg, each must have a stochastic falling yet between 70/80 and have red 2's on the moving averages....

as it falls, each time there is a 240 zigzag up leg, i'll blast the eurusd with 0.01 sell limits and stops 10 pips apart..... never more than 0.01 no matter the account size..... the trades themselves will begin to stack on each other because of different zigzag legs..... so the 10 pip grid becomes unrecognizable..

there can not be a 240 zigzag up leg without a 60, 30, 15, 5, and 1 up leg on the exact same pip..... so in essence, i'm selling all the retraces at once.....

once started, that account will trade nothing but that single pair and never more than 0.01 lot size..... my thought there is, even if that trade goes 200 pips against me what have i lost...... just 2 large sized whopper value meals at burger king...... didn't need them anyway......

at some point there will be a waterfall 240 zigzag leg..... so there will be gaps were no orders were placed...... thats a good thing.....

just watch the weekly and monthly counts..... once you get a bite...... hodl......h

//------
eurusd-h4-oanda-division1-worked-but-didnt-work.png
 

TradeChaser

Active Trader
May 12, 2020
151
6
34
30
//----

that had to do with my belief that the best system could buy, sell or both buy and sell on the exact same signal and make money..... from 5 years ago..... one day i hope to have time to chase that rabbit again.....
//


before i forget, and as i'm watching the eurusd turn against me, this is what i meant about selling the lower timeframes zigzag up legs in a larger timeframe downtrend..... chart below..... yellow checks at qqe signals that did not work well.....

this works best when you catch the weekly trend changes...... so, now is not a good time to attempt this with the eurusd...... 15 weeks ago was..... and more importantly when the entire currency group changes.....

so the idea is once the daily and weekly begin to fall, they must each have a zigzag up leg, each must have a stochastic falling yet between 70/80 and have red 2's on the moving averages....

as it falls, each time there is a 240 zigzag up leg, i'll blast the eurusd with 0.01 sell limits and stops 10 pips apart..... never more than 0.01 no matter the account size..... the trades themselves will begin to stack on each other because of different zigzag legs..... so the 10 pip grid becomes unrecognizable..

there can not be a 240 zigzag up leg without a 60, 30, 15, 5, and 1 up leg on the exact same pip..... so in essence, i'm selling all the retraces at once.....

once started, that account will trade nothing but that single pair and never more than 0.01 lot size..... my thought there is, even if that trade goes 200 pips against me what have i lost...... just 2 large sized whopper value meals at burger king...... didn't need them anyway......

at some point there will be a waterfall 240 zigzag leg..... so there will be gaps were no orders were placed...... thats a good thing.....

just watch the weekly and monthly counts..... once you get a bite...... hodl......h

//------
eurusd-h4-oanda-division1-worked-but-didnt-work.png
Are you closing anything during that waterfall 240 down leg? Perhaps when the leg reaches its average length? Or do you hold until weekly/daily hit average counts?
 

hayseed

Master Trader
Jul 27, 2010
815
200
109
usa
Are you closing anything during that waterfall 240 down leg? Perhaps when the leg reaches its average length? Or do you hold until weekly/daily hit average counts?
//---

a good trader would i think..... or at least place a trailing stop on them..... trailing stops on many orders being modified tick by tick can be a load on the platform..... so a trailing total profit ea is better..... especially when the number of orders is large....

i'm kinda wishy washy on it..... it depends on my goal..... sometimes my goal is just foolishly playing around trying to see how many winning trades in a row i can have on a single pair.... so in that case i dont close anything until the new weekly zigzag leg.....

other times i might just let the 0.01 trades ride and once they are deep in the green, place larger trades and close them when need be..... this is using the mistaken belief that i am trading with the profit or markets money....

not sure which way is best..... my way is probably not.....h
 

TradeChaser

Active Trader
May 12, 2020
151
6
34
30
//---

a good trader would i think..... or at least place a trailing stop on them..... trailing stops on many orders being modified tick by tick can be a load on the platform..... so a trailing total profit ea is better..... especially when the number of orders is large....

i'm kinda wishy washy on it..... it depends on my goal..... sometimes my goal is just foolishly playing around trying to see how many winning trades in a row i can have on a single pair.... so in that case i dont close anything until the new weekly zigzag leg.....

other times i might just let the 0.01 trades ride and once they are deep in the green, place larger trades and close them when need be..... this is using the mistaken belief that i am trading with the profit or markets money....

not sure which way is best..... my way is probably not.....h
Do you believe this to be something that can be replicated on smaller tf’s to adapt to an FTMO style challenge? For example instead of waiting for “Daily/Weekly” beginning to fall and have a count of red 2, do the same when the 4h/Daily?
 

hayseed

Master Trader
Jul 27, 2010
815
200
109
usa
Do you believe this to be something that can be replicated on smaller tf’s to adapt to an FTMO style challenge? For example instead of waiting for “Daily/Weekly” beginning to fall and have a count of red 2, do the same when the 4h/Daily?
/---

maybe..... the weak link in the selling 240 zigzag legs is the time it takes..... in the challenge, news and time spent are not considered..... once you pass they are....

if i pass, i will request the swing trading account for 2 reason.... first, kinda insurance for the rare case a trade might open or close during a news event..... second, the ability to hold over the weekend.....

something like the chart below might work better..... 15 psar as the trigger, when 100 ma, ao, qqe, and stoch agree on 15 thru daily....

i might sit out the challenge next week.... just don't have the proper time to monitor it..... you can't break their rules.....

even using their money and them taking the losses, their is still stress for us.....h
//----

eurusd-d1-ftmo-s-r-100-ao-qqe-stoch-zigzag.png
 

hayseed

Master Trader
Jul 27, 2010
815
200
109
usa
Is that to explain what I meant by 4H? That was simply to say 4Hour
//----

1. what do you see now....

2. what do you expect to see next.....

3. is there a difference between 1 and 2.....

4. if so, do you have any plans for that difference.....

say words..... 10 will do......h
 

TradeChaser

Active Trader
May 12, 2020
151
6
34
30
  1. new sell signals on multiple indicators
  2. continued down move with possible retrace of the current zz 4H leg
  3. I suppose I would say a pip difference, yes
  4. D1 is zzUp with bearish long term trend. I believe a sell is in order.
blasted 4H sell limits, added a market and stop order. (10 words)

thoughts?

I have hesitation that the Daily will make it up to the 1.0350 handle before the daily ZZ upward leg is finished.

1659485531801.png
 

hayseed

Master Trader
Jul 27, 2010
815
200
109
usa
blasted 4H sell limits, added a market and stop order. (10 words)
//----

sure hope your right..... if you are, those conditions might be put in a alerts only ea and scan the market on each new bar...... or perhaps even place the trades for you....

//------

think about the bbands stops for a minute.... very similar to the psar...... what often happens when the psar breaks...... bbands is similar......

once the bbands breaks, you can easily measure the distance between the 2 levels..... that distance varies but still gives you a measurement.....

if you look close, you can see most times the price might wobble above and below that initial entry point......

imagine blasting that initial bbands break with a market sell, sell limits and sell stops.......

how many orders would you send total.....

what would be the spacing on eurusd 15 minute chart....

what would your profit target in pips be......

is there a way to achieve 90% success.....

think in terms of as few of trades as possible closing as fast as possible while still achieving a worthwhile result......

say words.......h

//----
eurusd-m15-oanda-division1-blast.png
 

TradeChaser

Active Trader
May 12, 2020
151
6
34
30
if you look close, you can see most times the price might wobble above and below that initial entry point......
Are you referring to the retrace that follows a PSAR break? Like when you alluded to waiting for a fractal after the break of PSAR. Not sure how extreme you are meaning when you say wobble.

how many orders would you send total.....

what would be the spacing on eurusd 15 minute chart....
I have to cheat here by looking at your image because I honestly don't know, but these are really good questions.
Based on what I can see from your sell stop, it looks like there were possibly 6 sell limits and 1 market.
I know you said you like twice as many limit orders as stop orders, and it looks like a 30pip spread from your first activated order to the last limit order. 2:1 limit to stop ratio means 15 pips of sell stops covering a total grid range of about 45 pips across about 10 orders.

That makes spacing about 4 pips. Which is about where the M15 ATR(14) was when I assume these were activated. What is more, the H4 ATR (14) is about 40; and the H4 ATR(50) is 44 (both pretty close to the overall grid spread).

So my answer is one of two possibilities, but I would like you to correct me if you would:
  1. The number of trades would be to cover 1 ATR of the 4H candle
  2. perhaps always 10 trades, twice as many limits as stops, and the spacing is equal to the current M15 ATR?
what would your profit target in pips be......
More cheating. It looks like your order 133197635 (0.13 lots) has a profit target of 4x the trade spacing. I assume 133197633 is similar and I feel confident that 133197632 is the same. If spacing is about 4 to 5 pips, that would make profit be 20 pips - about half of what H4 ATR was. I know in the past you've mentioned not having profit targets less then 20 pips because it isn't worth it, so I am not sure if it is just your set profit or it does have to do with ATR.

What throws me is that you don't have a PT for order 133197644 (0.15 lots) unless it is overlapping another order. I also don't understand the order in which you scaled the grid, unless you have an existing 0.10 sized trade that would violate fifo. I am sure you have a reason, but it does throw me. I assume the trade at 1.0153 was also a H4 entry of larger size, and this grid is to catch that wobble you alluded to.

is there a way to achieve 90% success.....
This is the most intriguing question of all. I feel silly, but the only thing that comes to mind is simply having a stop lost 10x larger than the PT. If not this, then perhaps something more to do with confluence with other indicators or timeframes, but I don't think that is what you are after.

say words.......h
I probably said more than you cared to read!
 

hayseed

Master Trader
Jul 27, 2010
815
200
109
usa
Are you referring to the retrace that follows a PSAR break? Like when you alluded to waiting for a fractal after the break of PSAR. Not sure how extreme you are meaning when you say wobble.
//-----

i think my trades interfered...... that's my oanda account and the only way to have targets is to vary the lot size....

look at the first chart below..... bbands, nothing more...... see the distance on the breaks between them..... it varies.....

now look at the second chart...... forget that the trade appears bad...... the entry would have been at the yellow check..... the price immediately went against you...... then fell and wandered back and forth across the entry line.....

that's a bad example but something we all see...... we enter, then the trade swings negative, then positive , then negative, on and on......

so, using the bbands, if you wanted to take effective advantage of that natural price movement, how would you do it..... using the smallest number of trades to get a worthwhile result......

so, like you said, maybe 1 market sell, 4 sell limits and 2 sell stops...... spaced 4 pips apart.....

now, given that order placement, how could you achieve high win rates.... if you filter out the losing trades you are left with the winners or nothing at all.....

how could you filter out the losing times where it would not work.....
//-----

another different subject to think about.... lets say we did not have fifo and could place targets on equal sized orders......

we might place 10 sell stops spaced 10 pips apart with 20 pip profit targets..... so from the third order on, you are closing one and while opening another..... that's not efficient.....

so the numbers of orders need to limited by the profit targets....h
//----

gbpjpy-m5-oanda-division1-bbands.png


//----
gbpjpy-m1-oanda-division1-bbb-1.png
 

TradeChaser

Active Trader
May 12, 2020
151
6
34
30
look at the first chart below..... bbands, nothing more...... see the distance on the breaks between them..... it varies.....
Are you saying that there is something to this variability, or that it is important to remember and use later (perhaps for the grid width). A wider gap means more volatility, which means after that impulse it would require an even bigger impulse to reverse it and thus it is more likely that a larger bband gap would sustain for a while - as evidenced in your picture that the blue to red breaks are smaller than the red to blue breaks (until the last one).

so, using the bbands, if you wanted to take effective advantage of that natural price movement, how would you do it..... using the smallest number of trades to get a worthwhile result......
Aside from the grid hypothetical below, I suppose the other option would be to place your grid in the bband gap alone, similar to a previous post you said about blasting a grid only above a 50fib level on the leg. This would either completely miss a trade, allow you to minimize your draw down, or lose altogether but much less then a grid at the yellow check.

so, like you said, maybe 1 market sell, 4 sell limits and 2 sell stops...... spaced 4 pips apart.....
now, given that order placement, how could you achieve high win rates.... if you filter out the losing trades you are left with the winners or nothing at all.....
how could you filter out the losing times where it would not work.....
More ignorance from me... I can think of a few ways:
  • Current timeframe trade direction agrees with long term trend indicators (if the bband break doesn't agree with Daily PSAR/AO/Peyton/100MA/etc, the grid doesn't get placed)
  • higher timeframe analysis and agreement with the greater trend. If it doesn't agree, the grid doesn't get placed.
  • Again, perhaps the gap of the bbands is the key, and if it is large enough (and agree's with trend), the trade get's place
  • Finally, perhaps this is where you bring in your ATR/ATR left data to determine if the bband break and bband gap is too large to place a grid 28 pips wide.

another different subject to think about.... lets say we did not have fifo and could place targets on equal sized orders......

we might place 10 sell stops spaced 10 pips apart with 20 pip profit targets..... so from the third order on, you are closing one and while opening another..... that's not efficient.....

so the numbers of orders need to limited by the profit targets....h
I would love to learn more about this in time.
 

TradeChaser

Active Trader
May 12, 2020
151
6
34
30
Trying to pick apart everything... Lots of good information. Looks like the best way to increase probability is larger tf. Speed of trade seems to be entering at the right time with the right grid.

Key takeaways I have taken since your Post #186:
  • seems like a good opportunity to blast the H4 leg with sells.
  • Alert was on a H4 chart
  • the bband break creates a gap that you can use to fill with limits and stops assuming higher time frame alignment for higher accuracy

Key takeaways from your video
  • what do the higher timeframes say. if all align, you won't waste a single 1M signal.
  • on a bband break, you highlighted possible entries on small timeframes, and mentioned trying to make a simply H4 ATR.
    • Does this mean on each trade (hence the 20 pip pt)?
    • or does this mean your grid spread from highest limit order to lowest profit target will be equal to that of a H4 ATR?
  • your words: "The idea is, during the course of the day, you will make one, 240 ATR".

Questions I have from all of the above:
  • Was the 240 break on the PSAR from Post #186 related to your video? The strategy you mentioned in the video seemed much more geared toward smaller timeframes and being in and out in a day.
    • So would you simply not start your lower timeframe strategy until the trigger on the 240?
  • your EURUSD grid (atleast what closed) spanned a width of 80 pips and the sum of the pips won totaled 205. For the GBPUSD, the span of closed trades shown had profit targets of 12 pips, spanned a width of 42 pips total, and won a total of 84.8 pips. All of these are incredible results, however they don't exactly align with your comment above - The idea is, during the course of the day, you will make one, 240 ATR.The grids were pretty wide, and the total pips won was much more than 240 ATR.
    • why was your strategy shown by the closed trades (marked by "bband sell blast") a bit different from the strategy you mentioned in the video (only targeting 240 ATR)?
  • In the video you speak to 9 timeframes of bbands and PSAR. In the previous pages of this thread you spoke to a different dash with different indicators and triggers. In your pop ups, you had other triggers of M1 QQE cross below without zigzag.
    • Are all of those triggers/alerts that would cause you to throw a grid up, or are some of those single order entry triggers?
    • Are all of these triggers, even the M1, getting 20 pip targets?

I know lots of questions, but I have not even had the opportunity to re-code my alerts with "DAILY ATR LEFT" and "WEEKLY ATR LEFT". So this is a lot of new stuff and strategy to consider and deploy!
 

hayseed

Master Trader
Jul 27, 2010
815
200
109
usa
  • why was your strategy shown by the closed trades (marked by "bband sell blast") a bit different from the strategy you mentioned in the video (only targeting 240 ATR)?
  • In the video you speak to 9 timeframes of bbands and PSAR. In the previous pages of this thread you spoke to a different dash with different indicators and triggers. In your pop ups, you had other triggers of M1 QQE cross below without zigzag.
    • Are all of those triggers/alerts that would cause you to throw a grid up, or are some of those single order entry triggers?
    • Are all of these triggers, even the M1, getting 20 pip targets?
//----

that bbbands blast ea was just an example trying to explain post 190 better..... it was written over 10 years ago before fifo and no hedge.....

i think in the video i mentioned the 240 atr only because it's about 20 pips on all pairs which gives you 4 bars a day to work with..... easy number to grasp and a reasonable target.....

that ea itself has some guidelines on order size and targets..... i'd have to look at the code to remember how it determines the values..... it uses triggers on psar, bbands , fractals and maybe some other things..... i can't remember, would have to look at the code....

so i really don't know why some trades closed early..... i'd estimate it has placed 100 trades this week and probably 97% hit their targets.....

winning trades in a row is one thing, winning trades in a row allowed to hit their profit targets is considerably more difficult.....h
 

hayseed

Master Trader
Jul 27, 2010
815
200
109
usa
Questions I have from all of the above:
  • Was the 240 break on the PSAR from Post #186 related to your video? The strategy you mentioned in the video seemed much more geared toward smaller timeframes and being in and out in a day.
    • So would you simply not start your lower timeframe strategy until the trigger on the 240?
  • your EURUSD grid (atleast what closed) spanned a width of 80 pips and the sum of the pips won totaled 205. For the GBPUSD, the span of closed trades shown had profit targets of 12 pips, spanned a width of 42 pips total, and won a total of 84.8 pips. All of these are incredible results, however they don't exactly align with your comment above - The idea is, during the course of the day, you will make one, 240 ATR.The grids were pretty wide, and the total pips won was much more than 240 ATR.
    • why was your strategy shown by the closed trades (marked by "bband sell blast") a bit different from the strategy you mentioned in the video (only targeting 240 ATR)?
//----

here again, i have no idea why the grids were wide..... could have been trades placed early in the week..... that ea will adjust the grid size by day of week... the thought is a trade placed on sunday can have more rope.... there is a input that asks for the day of week and adds it to the comments... by default it is blank....

about once a month i might make a mistake and place 2 same sized orders without targets ..... either manually or with ea's..... that's why i like having a profit target..... you can't place a same sized order if one already exists with a target..... oanda rejects the second one , calling it a fifo violation....... in that case, one trade might make 10 times more than another because the oldest trade must close first.....

a ea might have default settings which we see and memorize, but the ea itself might adjust those settings slightly for various reasons.....

suppose someone felt the eurusd would again in a reasonable time cross parity..... they might just place 0.01 orders with no targets above and below the price ..... or blast the psar and bbands breaks with no targets..... and just wait it out......

might be a less glamorous or manly way to trade, but who would know .......

unless i admitted it..... and i won't......h
 

TradeChaser

Active Trader
May 12, 2020
151
6
34
30
Nothing unglamorous about making money. I’ll admit, I’m getting lost between your shorter timeframe, quicker to close strategies and your order stacking, longer plays.

But I did just see your incredible results on the minimum wage. You literally made in 6 months what I hope to save for my kids school in 18 years. I think my emotions around forex about equal part inspired and equal part hopeless.

I think I am still getting hung up on the higher tf indicator agreement.

I get what you mean when you say if the bbands or PSAR line up on 9 tf you’re taking every single trade on the 1-minute, but on the M30, are you only taking the trade if every tf above agree? Or do only the majority of the tfs have to agree? And do any tf weigh more than others?

I feel like if I only take trades when every tf above the current tf agrees, there’s no way I’ll get 100ish trades. I could be completely wrong there, of course.

I also think that if you are trying to close trades same week, while the weekly trend weighs on my mind, it almost seems too far removed to weigh in on the 15 minute signals due to how minute they can be. But I am speculating. Haven’t traded a real dollar in years since my first trades when I realized I was just gambling.

I am going to try and work on the Daily ATR left and Weekly ATR left. I will get signal, check higher timeframes for agreement (still not sure what my yes/no will be for this but homing my gut can take me the right way), and then go with a simple target.

I think at this point I will check specifically for JJMA, AO cross, and BBAND STOP grid opportunities.
 
Last edited:

hayseed

Master Trader
Jul 27, 2010
815
200
109
usa
18 years. I think my emotions around forex about equal part inspired and equal part hopeless.
grid opportunities.
//-----

so you have 18 years of golden crosses followed later by death crosses ...... hard to see anything hopeless in that......

don't lose focus..... trend first..... entry second..... entry is almost immaterial....

when the market chose the terms golden and death, they were not chosen by accident.....h
//------

usdjpy-d1-oanda-division1-golden-cross.png

//----
eurusd-d1-oanda-division1-death-cross.png
 

TradeChaser

Active Trader
May 12, 2020
151
6
34
30
I know it may not matter, so long as you stick to it, but can you share your golden cross metrics? I cannot get my cross to show 4/19/2021 on the USDJPY