It is a lot easier to use a fixed number -10 to -8 is +2, do you need a %?
Posts made by jstap
-
RE: How to code condition block for change % of an indicatorposted in Questions & Answers
-
RE: 关于网格挂单里面没有马丁类型的可以选择posted in General Discussions
Need more information, how many trades per layer, does each layer interfere with trades placed on the previous layer?
-
RE: custom functionposted in Questions & Answers
The way I do this is like Roar has said, but I ask Chat GPT to tell me what to add, I will add an example:
I say this is an example of what I add to sections to create a maximise screen in my MT4 code.
in the on tick section I use this:
// Example usage: maximize the window
SetWindowState(SW_SHOWMAXIMIZED);
~next~In the custom function section I use this:
void SetWindowState(int desiredState) {
int hWnd = WindowHandle(Symbol(), Period());
int parent = GetParent(hWnd);// Check current state using WinUser32.mqh functions bool isMaximized = IsZoomed(parent); bool isMinimized = IsIconic(parent); if (desiredState == SW_SHOWMAXIMIZED && !isMaximized) { ShowWindow(parent, SW_SHOWMAXIMIZED); } else if (desiredState == SW_SHOWMINIMIZED && !isMinimized) { ShowWindow(parent, SW_SHOWMINIMIZED); } else if (desiredState == SW_RESTORE && (isMaximized || isMinimized)) { ShowWindow(parent, SW_RESTORE); }}
In the global variables section I use this:
#include <WinUser32.mqh>
#import "user32.dll"
int GetParent(int);
int ShowWindow(int, int);
#define SW_SHOWMAXIMIZED 3
#define SW_SHOWMINIMIZED 6
#define SW_RESTORE 9
#importUse this set-up and create a code that does this "Choose what you would like to create". It may take a few corrections but using this you can create blocks doing what you like...
-
RE: Fibonacci retracementposted in Questions & Answers
There is how to use Fibonacci in here: https://fxdreema.com/forum/topic/19269/using-fibonacci Hope you find it useful
-
RE: cross open candle today no workposted in Questions & Answers
So you open a trade at a set time, then if within 3 hours, it has moved enough to win and the price crosses something you want to close and not place another trade until the next day?
points(pips) = distance up or down
ticks = a price change -
RE: Fibonacci retracementposted in Questions & Answers
Depends on how you have your EA set up, add a shared link and say what you are trying to do.
-
RE: Buy and Sell Alternatelyposted in Questions & Answers
You can use flags or variables to stop EA from doing something until your conditions say taking a trade is viable.
-
RE: Past copyposted in Questions & Answers
You can't copy them, you can copy a section and create another with the same words, alternatively download the MQ file, import it back into FX, and you will have an exact copy including all constants.
-
RE: Past copyposted in Questions & Answers
That is how I copy and place blocs in the same project and onto others
-
RE: Past copyposted in Questions & Answers
Highlight - right click - copy - right click - paste where you want
-
RE: cross open candle today no workposted in Questions & Answers
I think expecting 300 pips in a tick is too much, so for now try with blocks that do not contain ticks, test and see if it works, then you know if it is using ticks that are stopping it from working
-
RE: Show initial deposit on the chartposted in Questions & Answers
That would have only worked for MT5, not tested but this should do it: https://fxdreema.com/shared/crazi6ffc
-
RE: Show initial deposit on the chartposted in Questions & Answers
According to ChatGPT this should do it, I haven't tested though: https://fxdreema.com/shared/CKLA9iHCb
-
RE: input my indicator name in the input settingposted in Questions & Answers
do both arrows appear at the same time?
-
RE: how can i put limit order on yesterday?posted in Questions & Answers
I have tried to draw a line on this time but I could not get it to: https://fxdreema.com/shared/Mq8H5ofpc
-
RE: how can i put limit order on yesterday?posted in Questions & Answers
Are you saying you would like to look at a time days in the past, not just the same day?
-
RE: cross open candle today no workposted in Questions & Answers
The biggest problem you have here is that the first tick on every candle is 0 (I don't know if FX uses the day candle for this), so it might be trying to use the wrong tick. I would link out certain blocks to see which ones are stopping trades.
-
RE: how can i put limit order on yesterday?posted in Questions & Answers
This will depend on your broker's time but, try this (alternatively you could save the price as it happens) :

-
RE: how can i put limit order on yesterday?posted in Questions & Answers
Start a project so you learn what to do with blocks.