Activity
Mon
Wed
Fri
Sun
Oct
Nov
Dec
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
What is this?
Less
More

Memberships

Automated Traders Community

Public • 336 • Free

10 contributions to Automated Traders Community
Strange - Tester vs Real
Hi Guys, I have made some adjustments to Rene tutorial on youtube about the OBV diversion strategy. In the strategy tester my EA performs well and draws the lines as it should from point to point, as per picture 1 When I run the exact same EA on a demo account the start of the lines go back to the start of the chart with zero value..... per attached picture 2... Anyone got any idea on what is going on? thanks in advance.
0
1
New comment Aug '23
Strange - Tester vs Real
Same Strategy On Multiple Symbols
Besides the obvious opening multiple charts and adding the same EA, has anyone come up with an easy way to run the same strategy on different pairs with different inputs via one EA on one Chart? I know that it is possible, but not really sure of the best way to approach it... thanks,
0
4
New comment Aug '23
0 likes • Aug '23
Awesome - thankyou!
0 likes • Aug '23
Thanks Mitchell, much appreciated.
MqlTick Struct
Hi Rene The MqlTick Struct built into MT5 is very convenient for current bid/ask etc. Is there a reason you don't use this in your course instead of using the symbol info double function? I find it much quicker and easier to get current symbol info but perhaps there is something that is not as good? thanks,
0
2
New comment Aug '23
1 like • Aug '23
ok great thanks for that, just wanted to make sure. Cheers
MT5 Masterclass Feedback!?
Hey Guys, today I want to address specifically those who attended the MT5 Masterclass. I would love to hear some feedback about it. Did you like it and did you learn to write MT5 programs? In the course I always try to explain everything as logical as possible. I am a self taught programmer, too. So I like a practical approach without the urge to try to sound super clever. Please also feel free to post the things that you miss in the content list. For those who do not know the MT5 Masterclass: https://en.bmtrading.de/mt5-masterclass/
Complete action
2
7
New comment Aug '23
1 like • Aug '23
I found it a very helpful course and really glad I went ahead and did it. I frequently go back and re watch tutorials to help me in my everyday programing. It has given me the fundamental knowledge to self-learn more and more from the internet/youtube and from forums. Without the course I would not know where to start. Perhaps another chapter on classes and object-oriented programming could be added as it would be great to delve into some slightly more advanced uses of classes for improving programing efficiency and just to gain a better understanding. All in all I would highly recommended for anyone who has not signed up.
Custom Array questions.
Hi everyone, I am having an issue with some code which compiles and can be run however the array indexes are not giving me the numbers I want. To put it simply I am trying to loop back through the chart bars anad find highs and lows based on "BarsN" to the left and right and then store the highs and lows in an array. When I go back to call the array and ask for index 0 and index 1 the numebrs I am getting do not match the objects I have created on the chart. Here is the ontick function, I have placed "*****" after the lines that I seem to be having the issue with. Basically I want it to look back from time current to the first low/high and then again to the 2nd low/high and work out if a trend is forming... Any help would be appreciated - Thanks. int bars = iBars(_Symbol, PERIOD_CURRENT); if (totalBars != bars) { totalBars = bars; Comment("DownTrend: ",isDownTrend, "\nUpTrend: ",isUpTrend); // Remove previous objects (if any) for (int i = 0; i < currentIndex; i++) { ObjectsDeleteAll(0,"HighCircle"); ObjectsDeleteAll(0,"LowCircle"); } for (int i = 0; i < iBars(_Symbol, PERIOD_CURRENT); i++) { if (i > BarsN && iHighest(_Symbol, HIGHLOWTRIGGERTIMEFRAME, MODE_HIGH, BarsN*2+1, i-BarsN) == i) { double high = iHigh(_Symbol, HIGHLOWTRIGGERTIMEFRAME, i); string objectName = "HighCircle" + IntegerToString(i); ObjectCreate(0, objectName, OBJ_ARROW_UP, 0, iTime(_Symbol, PERIOD_CURRENT, i), high); ObjectSetInteger(0, objectName, OBJPROP_COLOR, clrRoyalBlue); ObjectSetInteger(0, objectName, OBJPROP_FILL, clrRoyalBlue); // Store the high price in the array highObjectPrices[currentIndex] = high; currentIndex++; // Reset the index if it exceeds 4 (since you want to store 5 highs and 5 lows) if (currentIndex >= ArrSize) { currentIndex = 0; } } if (i > BarsN && iLowest(_Symbol, HIGHLOWTRIGGERTIMEFRAME, MODE_LOW, BarsN*2+1, i-BarsN) == i) { double low = iLow(_Symbol, HIGHLOWTRIGGERTIMEFRAME, i); string objectName = "LowCircle" + IntegerToString(i);
1
5
New comment Aug '23
0 likes • Aug '23
Hey Rene, no problems here it is attached, if you compile and run it you will see in the chart comments the highs/lows dont align with the up/down arrows drawn on the chart at the highs and lows. thanks
1 like • Aug '23
Hey Rene, thanks for pointing me in the right direction, I ended up changing a few things around to get it working. here is the updated code snippet - cheers int bars = iBars(_Symbol, HIGHLOWTRIGGERTIMEFRAME); if (totalBars != bars) { totalBars = bars; Comment("DownTrend: ", isDownTrend, "\nUpTrend: ", isUpTrend); // Remove previous objects (if any) ObjectsDeleteAll(0, "HighCircle"); ObjectsDeleteAll(0, "LowCircle"); double highs[]; ArrayResize(highs, 2); // Initialize the dynamic array for highs double lows[]; ArrayResize(lows, 2); // Initialize the dynamic array for lows // Reset the dynamic arrays to zero ArrayInitialize(highs, 0); ArrayInitialize(lows, 0); for (int i = 0; i < MaxLookback; i++) { if (i > BarsN && iHighest(_Symbol, HIGHLOWTRIGGERTIMEFRAME, MODE_HIGH, BarsN*2+1, i-BarsN) == i) { double high = iHigh(_Symbol, HIGHLOWTRIGGERTIMEFRAME, i); string objectName = "HighCircle" + IntegerToString(i); ObjectCreate(0, objectName, OBJ_ARROW_UP, 0, iTime(_Symbol, PERIOD_CURRENT, i), high); ObjectSetInteger(0, objectName, OBJPROP_COLOR, clrRoyalBlue); ObjectSetInteger(0, objectName, OBJPROP_FILL, clrRoyalBlue); // Store high values in the dynamic array for (int j = 0; j < ArraySize(highs); j++) { if (highs[j] == 0.0) { highs[j] = high; break; } } } if (i > BarsN && iLowest(_Symbol, HIGHLOWTRIGGERTIMEFRAME, MODE_LOW, BarsN*2+1, i-BarsN) == i) { double low = iLow(_Symbol, HIGHLOWTRIGGERTIMEFRAME, i); string objectName = "LowCircle" + IntegerToString(i); ObjectCreate(0, objectName, OBJ_ARROW_DOWN, 0, iTime(_Symbol, PERIOD_CURRENT, i), low); ObjectSetInteger(0, objectName, OBJPROP_COLOR, clrRed); ObjectSetInteger(0, objectName, OBJPROP_FILL, clrRed); // Store low values in the dynamic array for (int j = 0; j < ArraySize(lows); j++) { if (lows[j] == 0.0) { lows[j] = low; break; } } } }
1-10 of 10
Angus Knight
2
11points to level up
@angus-knight-5633
Trader based in Australia.

Active 362d ago
Joined Jul 18, 2023
powered by