I'm trying to get the value of a bar ( Close - Open) in $.
I searched for information in the doc and came up with a script that doesn't satisfy me.
I missed something but I don't know what or where to find it.
(I think it's the lot size, but is this info accessible by code in NT8?)
If one of you could take a look at my code and tell me what's wrong.
Thank you in advance.
double ValeurDuTick = TickSize;
Print("Tick Value " +ValeurDuTick.ToString());
double value = 1/TickSize;
Print("TickSize " + value);
Print("Open " + Open[1]);
Print("Close " + Close[1]);
value =Close[1] -Open[1];
Print("Value in points " + value);
value =value / TickSize;
Print("Value in ticks " + value);
value =value* ValeurDuTick;
Print("Value in $ " + value);
TickSize 64
Open 109,453125
Close 109,671875
Value in points 0,21875
Value in ticks 14
Value in $ 0,21875

Comment