Library Studio
-
@jjegtrader79 You can do that with standard variables. I don't think you need the Studio.
-
How do you delete your code from Studio if you want it to be removed ?
-
is there a tutorial on using the Studio. I tried to define a simple Custom Block that actually does nothing. A block with 2 paramters as simple as this: string XORCipher(string input, string key) {} I defined two parameters; input (a string) and key (a string). Compiling this gives me more errors than the definition itself.
Compilation errors
'input' - unexpected token
'input' - unexpected token
'=' - declaration without type
function declarations are allowed on global, namespace or class scope only
'input' - unexpected token
'}' - not all control paths return a valueAny ideas what is wrong here ? and perhaps an example of a simple piece with parameters that works. For me as a starting point ?
Thanks! -
I have found what I was looking for. Pls ignore my previous requests.
-
How do I "Return" values (into which variables) to FXdreema where you are using the custom blocks ? Do you use parameters defined in Parameters used in Block to return results ?
-
I'm not a programmer, so this is not my field of expertise. My guess is that you can create those variables in fxDreema normally and then return the values from custom blocks via 'custom code' blocks, so not through the custom blocks themselves. But maybe I'm wrong here.

-
Ok, I get that - from within the custom block you can access variables than you defined in 'regular' FxDreema. So that should be able. I am thinking about the normal block for example Modify Variable where one of the parameters in the variable that you want to receive (from within the block) the value of for example MA period 14. So writing FROM a custom block to a variable in your FXD EA.
-
I don't understand how you can return a value from within the custom block - back to the calling FXD EA.....
-
if the value is saved into a variable created in FA but written to from the custom block code you can reference it from your variable.
-
I have the following variables defined in my EA

I Check ReturnCheckVar in my EA but I always get back false (I think it remains unchanged)
In studio I have this code: - ReturnCheckVar is defined as you describe. In the expert tab I see the print: true true
So it does not seem to work.
bool TradeActive,ReturnCheckVar;
ReturnCheckVar=Global_Check_Trade_ActiveLocal(Prefix,TradeActive);
Print(ReturnCheckVar,TradeActive);
~next~ -
All I can say is I do it all the time

calculatetlot is sent from function to variables:

-
OK, I understand that you send variable values from your Custom function to the Custom Block (code in Area A). I meant sending variable values to the EA in FXDreema where you used a Custom Block.
-
Thought I sent tis before, create it in FX, then you can use:

-
Ok, so apparently that should work although it does not seem to work for me. In your example, you show calculatedLot as a double in your FDX EA, right ? I don't see this exact value in your previous screenshot but I gather thery are named EXACTLY the same ?
-
This is how I used in in Sudio and then called it (see previous screenshot)

-
Ah you use a Custom Function named CalculatedLotSize where you pass the value of slPoints to a variable named calculatedLot - which is then available in your EA. Correct ?
-
the calculatedlot that is saved into the calculatedlot variable in the function is then used from the variable in the project EA
-
Unfortunately the variable set in my function is not passed on to my EA:

My printf in the function below says TRUE. The check in my EA gives false for variable ReturnRalph

-
how is your global variable set? If it's not it can't return true.
-
I think I am missing the point of your question (due to lack of knowledge). In the EA I have the variable ReturnRalph as boolean defined. I defined ReturnRalph as boolean in the Custom Fucntion GlobalCheck_Trade_ActiveLocalEA as shown on the screenshot. What is missing that allows a proper return ?